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

Tab characters break forum JSON parsing

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.8.3
    • None
    • Forum
    • None
    • 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

            Unassigned Unassigned
            schiem Michael Yoder
            Andrew Lyons, 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: