Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83187

Invalid response in WebServices returning filtered text as PARAM_TEXT

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.5
    • Filters
    • MOODLE_405_STABLE

      When applying filters to some text, the result can contain HTML, e.g. if the text has MathJax. If this filtered text is returned in a WebService using PARAM_TEXT, this throws an 'Invalid response' error. 

      The last case I detected is in core_files_get_files. When retrieving "Site files" (contextid=0 and itemid=0), you receive 1 folder per category, and then in each category you get 1 folder per course. Course names are filtered, so if you have a course with MathJax you end up with the 'Invalid response' error.

      This can be reproduced with the mobile app, open the user menu at the top-right, go to Files, select 'Site files' and then open a category with a course containing MathJax in its name.

      In this case, since this is supposed to be a file name, maybe the best solution is to filter the text and then remove the HTML of the result.

      We've found this same error in other WebServices, we should try to find other WebServices that could be affected by this.

            jleyva Juan Leyva
            dpalou Dani Palou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.