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

Tab characters break forum JSON parsing

    XMLWordPrintable

Details

    • Bug
    • Status: Development in progress
    • Minor
    • Resolution: Unresolved
    • 3.8.3, 3.11.5, 4.0
    • None
    • Forum

    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

            bryce.yoder@moodle.com Bryce Yoder
            schiem Michael Yoder
            Shamim Rezaie Shamim Rezaie
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
            Votes:
            9 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 15 minutes
                4h 15m