-
Bug
-
Resolution: Fixed
-
Minor
-
3.8.1
-
MOODLE_38_STABLE
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
MDL-68098-master -
Example on how to reproduce it:
- As admin, enable MathJax and allow it to be applied to "Content and headings".
- In a forum, create a new post and put some MathJax in the subject (e.g. $$(a+b)=2$$).
- Now call the WebService mod_forum_get_forum_discussions with the forumid of the forum used before. You will get an "Invalid response value" exception.
The forum subject is PARAM_TEXT, and the text "$$(a+b)=2$$" is a valid text. However, by default WebServices filter the content before returning it, and the MathJax filter adds HTML to the subject. The WebService defines this field as PARAM_TEXT too (like the form field), so the type is invalid because it includes HTML.
This seems to affect several WebServices. E.g. if you add MathJax to a course name you break the WebService core_enrol_get_users_courses (and probably some others like mod_assign_get_assignments).