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

"quote" Mustache helper only escapes first quote in JS

    XMLWordPrintable

    Details

      Description

      The JS variant of the "quote" Mustache helper only escapes the first double quote in the string. Responsible for that is this call: https://github.com/moodle/moodle/blob/0dca957716952323bd56089929ac6412136a29f1/lib/amd/src/templates.js#L487

      Steps to reproduce the problem:

      1. Login as Manager.
      2. Add upcoming_events block to your dashboard.
      3. Create assignment in one of your courses with:
        • Due date: tomorrow
        • Name: Double "quote" test
      4. Go to the dashboard.
        => You get a Syntax error "Unexpected token t in JSON at position 27".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tschroeder Tim Schroeder
              Reporter:
              tschroeder Tim Schroeder
              Peer reviewer:
              Bas Brands
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Gladys Basiana
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Bas Brands
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 55 minutes
                  55m