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

Javascript strings not correctly scaped causes failure on some components

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7, 1.7.1
    • 1.8.7, 1.9.3, 2.0
    • SCORM
    • None
    • MOODLE_16_STABLE, MOODLE_17_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

    Description

      Proof of concept: put \' character in errorlogs string from scorm. Then try to put a scorm activity (you'll get a "no manifest found" error). See mod.html in scorm directory and the line result.concat('<?php print_string('errorlogs','scorm',NULL,"'") ?>:\n'+errorlogs);

      If errorlogs has a ' in it causes a problem because the string within concat is prematurely closed.

      I don't think putting a
      before the \' in the language file is the best solution. Perhaps this strings are reused in another context... i don't know really :-P So here comes this report

      Thanks in advance

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              jsegarra Juan Segarra Montesinos
              Dan Marsden, Matteo Scaramuccia, Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/Oct/08