MDL-67336 mod_forum: Fixing forum inline reply filtering before saving
authorMikel Martín <mikel@moodle.com>
Tue, 17 Dec 2019 12:20:14 +0000 (13:20 +0100)
committerMikel Martín <mikel@moodle.com>
Tue, 17 Dec 2019 12:20:14 +0000 (13:20 +0100)
mod/forum/externallib.php

index 6d80dab..23788fd 100644 (file)
@@ -1319,7 +1319,7 @@ class mod_forum_external extends external_api {
             $preferredformat = editors_get_preferred_format();
             // If the post is not HTML and the preferred format is HTML, convert to it.
             if ($params['messageformat'] != FORMAT_HTML and $preferredformat == FORMAT_HTML) {
-                $params['message'] = format_text($params['message'], $params['messageformat'], ['context' => $context]);
+                $params['message'] = format_text($params['message'], $params['messageformat'], ['filter' => false]);
             }
             $params['messageformat'] = $preferredformat;
         }