diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 539a410476d..c495a63489d 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -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;