MDL-47371 block_navigation: Don't double escape course titles

This commit is contained in:
Cameron Ball 2016-07-05 17:57:55 +08:00
parent 6fb1a7177f
commit a530cb93f5
No known key found for this signature in database
GPG Key ID: 305B7F70214D810C

View File

@ -2460,9 +2460,7 @@ class global_navigation extends navigation_node {
$coursenode = $parent->add($coursename, $url, self::TYPE_COURSE, $shortname, $course->id);
$coursenode->hidden = (!$course->visible);
// We need to decode &'s here as they will have been added by format_string above and attributes will be encoded again
// later.
$coursenode->title(str_replace('&', '&', $fullname));
$coursenode->title(format_string($course->fullname, true, array('context' => $coursecontext, 'escape' => false)));
if ($canexpandcourse) {
// This course can be expanded by the user, make it a branch to make the system aware that its expandable by ajax.
$coursenode->nodetype = self::NODETYPE_BRANCH;