-
Bug
-
Resolution: Fixed
-
Minor
-
1.9
-
None
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
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().
- has a non-specific relationship to
-
MDL-13975 p() and s() should not be used to print lang strings
-
- Closed
-