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

Tab characters in event names produce malformed JSON in mustache template

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a course
      2. Create an assignment with the following:
        • Give the assignment a name with tabs, you can create one in text editor by press `tab` key, copy the tab character and paste in assignment name
      3. Enrol a student in the course and log in as student
      4. Browse to the dashboard page
      5. On the timeline block, select "Next 7 days" from the dropdown with the clock icon on it
      6. No errors observed, before this fix, you get this error: "JSON.parse: bad control character in string literal at line 1 column 14 of the JSON data"
      Show
      Create a course Create an assignment with the following: Give the assignment a name with tabs, you can create one in text editor by press `tab` key, copy the tab character and paste in assignment name Enrol a student in the course and log in as student Browse to the dashboard page On the timeline block, select "Next 7 days" from the dropdown with the clock icon on it No errors observed, before this fix, you get this error: "JSON.parse: bad control character in string literal at line 1 column 14 of the JSON data"
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-65203-310
    • Pull 3.11 Branch:
      MDL-65203-311
    • Pull Master Branch:
      MDL-65203-master
    • Story Points:
      2
    • Sprint:
      Internationals - 3.11 Sprint 5

      Description

      1. Create a course
      2. Create an assignment with the following:
        • Give the assignment a name like: "A. my name chef" - NB: There is a TAB character (https://graphemica.com/0009) between the "A." and "my"
        • Set the due date for like 2 days from now
      3. Enrol a student in the course and log in as them
      4. Browse to the dashboard page
      5. On the timeline block to the top right of the page select "Next 7 days" from the dropdown with the clock icon on it
      6. You should get an error from the browser (it varies from browser to browser), in firefox it says "JSON.parse: bad control character in string literal at line 1 column 14 of the JSON data"

        Attachments

        1. image-2020-05-14-09-37-40-996.png
          72 kB
          Douglas Nantes Gualberto
        2. image-2020-05-14-09-41-21-074.png
          17 kB
          Douglas Nantes Gualberto
        3. MDL-65203.jpg
          47 kB
          Anna Carissa Sadia

          Activity

            People

            Assignee:
            dongsheng Dongsheng Cai
            Reporter:
            cameron1729 cameron1729
            Peer reviewer:
            Sujith Haridasan Sujith Haridasan
            Integrator:
            Adrian Greeve Adrian Greeve
            Tester:
            Anna Carissa Sadia Anna Carissa Sadia
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            12 Vote for this issue
            Watchers:
            25 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/Jul/21

                Time Tracking

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