From b73bb7b9c47903e8325fddd94b812479b6e90d10 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 29 Apr 2020 00:25:45 +0100 Subject: [PATCH] MDL-66900 course: don't clean category description when editing. --- course/classes/editcategory_form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/course/classes/editcategory_form.php b/course/classes/editcategory_form.php index 2e58af3eba0..f11d28c0b41 100644 --- a/course/classes/editcategory_form.php +++ b/course/classes/editcategory_form.php @@ -75,6 +75,7 @@ class core_course_editcategory_form extends moodleform { $mform->addElement('editor', 'description_editor', get_string('description'), null, $this->get_description_editor_options()); + $mform->setType('description_editor', PARAM_RAW); if (!empty($CFG->allowcategorythemes)) { $themes = array(''=>get_string('forceno')); @@ -105,7 +106,8 @@ class core_course_editcategory_form extends moodleform { return array( 'maxfiles' => EDITOR_UNLIMITED_FILES, 'maxbytes' => $CFG->maxbytes, - 'trusttext' => true, + 'trusttext' => false, + 'noclean' => true, 'context' => $context, 'subdirs' => file_area_contains_subdirs($context, 'coursecat', 'description', $itemid), );