MDL-69048 book: Sanitize previous chapter value in add new chapter page
authorMihail Geshoski <mihail@moodle.com>
Fri, 14 Aug 2020 03:11:01 +0000 (11:11 +0800)
committerJenkins <jenkins@worker08.test.in.moodle.com>
Tue, 8 Sep 2020 06:54:26 +0000 (08:54 +0200)
mod/book/edit_form.php

index e681e56..52b5d7b 100644 (file)
@@ -51,7 +51,7 @@ class book_chapter_edit_form extends moodleform {
         if (isset($chapter->currentchaptertitle)) {
             $mform->addElement('static', 'details',
                 get_string('previouschapter', 'mod_book'),
-                $chapter->currentchaptertitle
+                trim(format_string($chapter->currentchaptertitle, true))
             );
         }