Commit ad840aca authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge "Bug 1507432: Avoid double escaping of messages"

parents a8ce0379 6a057322
...@@ -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