Commit fb2ecd3b authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1507432: Avoid double escaping of messages



behatnotneeded

Change-Id: I2d0d838b1bb578bfc9f8ff2b778badfb09045d45
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 6a057322)
parent 40e2b971
...@@ -90,6 +90,11 @@ class PluginBlocktypeInbox extends SystemBlocktype { ...@@ -90,6 +90,11 @@ class PluginBlocktypeInbox extends SystemBlocktype {
if ($showmore = count($records) > $maxitems) { if ($showmore = count($records) > $maxitems) {
unset($records[$maxitems]); unset($records[$maxitems]);
} }
if ($records) {
foreach ($records as &$r) {
$r->message = format_notification_whitespace($r->message, $r->type);
}
}
$smartytemplate = 'blocktype:inbox:inbox.tpl'; $smartytemplate = 'blocktype:inbox:inbox.tpl';
} }
...@@ -98,7 +103,6 @@ class PluginBlocktypeInbox extends SystemBlocktype { ...@@ -98,7 +103,6 @@ class PluginBlocktypeInbox extends SystemBlocktype {
foreach ($records as &$r) { foreach ($records as &$r) {
$section = empty($r->plugintype) ? 'activity' : "{$r->plugintype}.{$r->pluginname}"; $section = empty($r->plugintype) ? 'activity' : "{$r->plugintype}.{$r->pluginname}";
$r->strtype = get_string('type' . $r->type, $section); $r->strtype = get_string('type' . $r->type, $section);
$r->message = format_notification_whitespace($r->message, $r->type);
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment