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

Tab characters in event names produce malformed JSON in mustache template

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-65203-311
    • MDL-65203-master
    • 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"
    • 2
    • 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

        Activity

          People

            dongsheng Dongsheng Cai
            cameron1729 cameron1729
            Sujith Haridasan Sujith Haridasan
            Adrian Greeve Adrian Greeve
            Anna Carissa Sadia Anna Carissa Sadia
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            12 Vote for this issue
            Watchers:
            24 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              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