From 19bda8aa7e005870f18f512bd5392fb7fac681f3 Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Tue, 10 Oct 2017 15:06:23 +0200 Subject: [PATCH] MDL-60377 webservice: Format correctly text returned by WS --- course/externallib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/course/externallib.php b/course/externallib.php index 619129741f6..ac028ccf460 100644 --- a/course/externallib.php +++ b/course/externallib.php @@ -256,8 +256,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