diff --git a/blocks/course_overview/renderer.php b/blocks/course_overview/renderer.php index b0b4507a0a3..1ac4e90312f 100644 --- a/blocks/course_overview/renderer.php +++ b/blocks/course_overview/renderer.php @@ -101,7 +101,8 @@ class block_course_overview_renderer extends plugin_renderer_base { } - $attributes = array('title' => s($course->fullname)); + // No need to pass title through s() here as it will be done automatically by html_writer. + $attributes = array('title' => $course->fullname); if ($course->id > 0) { $courseurl = new moodle_url('/course/view.php', array('id' => $course->id)); $coursefullname = format_string($course->fullname, true, $course->id); diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 432a120dad6..da2f7b3c7d3 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -2367,7 +2367,9 @@ class global_navigation extends navigation_node { $coursenode = $parent->add($coursename, $url, self::TYPE_COURSE, $shortname, $course->id); $coursenode->nodetype = self::NODETYPE_BRANCH; $coursenode->hidden = (!$course->visible); - $coursenode->title($fullname); + // 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)); if (!$forcegeneric) { $this->addedcourses[$course->id] = $coursenode; }