Skip to content

Commit

Permalink
SCORM MDL-31397 - add slashes to js string
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Feb 17, 2012
1 parent e0d5a17 commit 88f5848
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mod/scorm/datamodels/debug.js.php
Expand Up @@ -52,11 +52,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();
}
}
Expand Down Expand Up @@ -729,9 +729,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);
Expand Down

0 comments on commit 88f5848

Please sign in to comment.