From: Cameron Ball Date: Wed, 13 Jul 2016 02:24:58 +0000 (+0800) Subject: MDL-47371 mod_book: Fix out of scope $unescapedtitle X-Git-Tag: v3.2.0-beta~832^2 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=48ae4707cc0010e6613c6e209036e6b68c1ceef4;ds=sidebyside MDL-47371 mod_book: Fix out of scope $unescapedtitle --- diff --git a/mod/book/locallib.php b/mod/book/locallib.php index bb46c0183a7..0cfe1921b7e 100644 --- a/mod/book/locallib.php +++ b/mod/book/locallib.php @@ -331,6 +331,7 @@ function book_get_toc($chapters, $chapter, $book, $cm, $edit) { $toc .= html_writer::start_tag('ul'); foreach ($chapters as $ch) { $title = trim(format_string($ch->title, true, array('context'=>$context))); + $titleunescaped = trim(format_string($ch->title, true, array('context' => $context, 'escape' => false))); if (!$ch->hidden) { if (!$ch->subchapter) { $nch++;