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

This commit is contained in:
Cameron Ball
2016-07-12 10:34:43 +08:00
parent ce4ff71aa3
commit 469a0854e3
+1 -3
View File
@@ -2458,9 +2458,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;