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

  html entity is printed litteraly in Javascript alert windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Accessibility, Language
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When a string containing a   entity is displayed by Javascript in an alert window, the entity is not interpreted, but written litteraly.

      Example (occuring when taking a quiz attempt with a time limit, in french language):

      $string['confirmstarttimelimit'] = 'Le temps pour effectuer ce test est limité. Voulez-vous vraiment le commencer ?' (quiz.php in french language pack)

      • function addslashes_js($strconfirmstartattempt) is called in /mod/quiz/accessrules.php (line 684)
      • var $strconfirmstartattempt is defined by calling print_start_attempt_button() (line 204)
      • function confirm_start_attempt_message () is called by print_start_attempt_button()
      • function getstring is called by confirm_start_attempt_message() (line 319)

      This could maybe be fixed by calling html_entity_decode() on the string before addslashes_js().

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/08