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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.1
    • Fix Version/s: 3.5.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-62931-master

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/18

                Time Tracking

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