Merge branch 'MDL-60377-master' of git://github.com/jleyva/moodle
authorDavid Monllao <davidm@moodle.com>
Mon, 30 Oct 2017 10:42:11 +0000 (11:42 +0100)
committerDavid Monllao <davidm@moodle.com>
Mon, 30 Oct 2017 10:42:11 +0000 (11:42 +0100)
course/externallib.php
mod/page/classes/external.php

index 73e4b80..d3aba3b 100644 (file)
@@ -268,8 +268,9 @@ class core_course_external extends external_api {
 
                         if (!empty($cm->showdescription) or $cm->modname == 'label') {
                             // We want to use the external format. However from reading get_formatted_content(), $cm->content format is always FORMAT_HTML.
+                            $options = array('noclean' => true);
                             list($module['description'], $descriptionformat) = external_format_text($cm->content,
-                                FORMAT_HTML, $modcontext->id, $cm->modname, 'intro', $cm->id);
+                                FORMAT_HTML, $modcontext->id, $cm->modname, 'intro', $cm->id, $options);
                         }
 
                         //url of the module
index 260512a..8b10f1e 100644 (file)
@@ -161,8 +161,9 @@ class mod_page_external extends external_api {
                                                                 $page->introformat, $context->id, 'mod_page', 'intro', null);
                 $page->introfiles = external_util::get_area_files($context->id, 'mod_page', 'intro', false, false);
 
+                $options = array('noclean' => true);
                 list($page->content, $page->contentformat) = external_format_text($page->content, $page->contentformat,
-                                                                $context->id, 'mod_page', 'content', $page->revision);
+                                                                $context->id, 'mod_page', 'content', $page->revision, $options);
                 $page->contentfiles = external_util::get_area_files($context->id, 'mod_page', 'content');
 
                 $returnedpages[] = $page;