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

Lang string is not properly escaped in "add a question" page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.5.2
    • 3.5.1
    • Questions
    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • MDL-62931-master
    • Hide
      1. Go to Site administration > Languages > Language customisation and choose to customise the English language pack
      2. Insert a single quote and also a double quote in the texts for (filterbytags, core_question) and (notagfiltersapplied, core_question). For example:
        (filterbytags, core_question) = Filter "by' tags...
        (notagfiltersapplied, core_question) = No tag "filters' applied
      3. Save changes to the language pack
      4. Go inside a course and go to the course's question bank and visit the questions tab if you are not already there
      5. Verify that you can see both of the above texts on the page.
      Show
      Go to Site administration > Languages > Language customisation and choose to customise the English language pack Insert a single quote and also a double quote in the texts for (filterbytags, core_question) and (notagfiltersapplied, core_question). For example: (filterbytags, core_question) = Filter "by' tags... (notagfiltersapplied, core_question) = No tag "filters' applied Save changes to the language pack Go inside a course and go to the course's question bank and visit the questions tab if you are not already there Verify that you can see both of the above texts on the page.

      With a site in the Catalan language, when loading the "add a question" to a course's question bank, the page gives the error "Uncaught SyntaxError: Unexpected identifier", pointing to "edit.php?courseid=2&lang=ca:1467", where one can find var noSelectionText = 'No hi ha cap filtre d'etiqueta aplicat'; ... where an unescaped single quote can be observed.

      This breaks the page completely.

      Reproduced on qa.moodle.net 5 minutes ago.

            rezaie9 Shamim Rezaie
            scyrma Mathieu Petit-Clair
            Simey Lameze Simey Lameze
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.