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

Tab characters break forum JSON parsing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8.3
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_38_STABLE

      Description

      Putting a tab character into the name of a discussion forum will trigger a JSON syntax error response whenever the post is displayed using AJAX.

       

      Reproduction steps:

      1. Create a new discussion forum
      2. Create a topic in the discussion forum with a tab character in the title (you will probably have to copy and paste it in)
      3. Reply to the discussion forum with the non advanced editor (that loads via ajax)
      4. A JSON parsing syntax error will be triggered when trying to parse the AJAX response

       

      Expected Behavior:

      The forum should post the response to the discussion.

      Observed Behavior:

      An error is thrown.

       

      This also affects loading discussions for grading.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            schiem Michael Yoder
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated: