Skip to content
Browse files

SCORM MDL-31397 - add slashes to js string

  • Loading branch information...
1 parent 0dde394 commit 9e93f995dc961749ba98ca141edc8c5d02ddfcc4 @danmarsden danmarsden committed Feb 1, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 mod/scorm/datamodels/debug.js.php
View
8 mod/scorm/datamodels/debug.js.php
@@ -70,11 +70,11 @@ function toggleLog () {
if (getLoggingActive() == "A") {
AppendToLog("Moodle Logging Deactivated", 0);
setLoggingActive('N');
- logButton.innerHTML = '--><?php print_string('scormloggingoff', 'scorm') ?>';
+ logButton.innerHTML = '--><?php echo addslashes_js(get_string('scormloggingoff', 'scorm')); ?>';
} else {
setLoggingActive('A');
AppendToLog("Moodle Logging Activated", 0);
- logButton.innerHTML = '<?php print_string('scormloggingon', 'scorm') ?>';
+ logButton.innerHTML = '<?php echo addslashes_js(get_string('scormloggingon', 'scorm')); ?>';
logPopUpWindow.focus();
}
}
@@ -747,9 +747,9 @@ function LogAPICall(func, nam, val, rc) {
logButton.name = 'logToggle';
logButton.href = 'javascript:toggleLog();';
if (getLoggingActive() == "A") {
- logButton.innerHTML = '<?php print_string('scormloggingon', 'scorm') ?>';
+ logButton.innerHTML = '<?php echo addslashes_js(get_string('scormloggingon', 'scorm')); ?>';
} else {
- logButton.innerHTML = '<?php print_string('scormloggingoff', 'scorm') ?>';
+ logButton.innerHTML = '<?php echo addslashes_js(get_string('scormloggingoff', 'scorm')); ?>';
}
var content = safeGetElement(document, 'scormpage');
content.insertBefore(logButton, content.firstChild);

0 comments on commit 9e93f99

Please sign in to comment.
Something went wrong with that request. Please try again.