mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
SCORM MDL-31397 - add slashes to js string
This commit is contained in:
parent
ad5202771a
commit
731882b52d
1 changed files with 4 additions and 4 deletions
|
@ -70,11 +70,11 @@ function toggleLog () {
|
||||||
if (getLoggingActive() == "A") {
|
if (getLoggingActive() == "A") {
|
||||||
AppendToLog("Moodle Logging Deactivated", 0);
|
AppendToLog("Moodle Logging Deactivated", 0);
|
||||||
setLoggingActive('N');
|
setLoggingActive('N');
|
||||||
logButton.innerHTML = '--><?php print_string('scormloggingoff', 'scorm') ?>';
|
logButton.innerHTML = '--><?php echo addslashes_js(get_string('scormloggingoff', 'scorm')); ?>';
|
||||||
} else {
|
} else {
|
||||||
setLoggingActive('A');
|
setLoggingActive('A');
|
||||||
AppendToLog("Moodle Logging Activated", 0);
|
AppendToLog("Moodle Logging Activated", 0);
|
||||||
logButton.innerHTML = '<?php print_string('scormloggingon', 'scorm') ?>';
|
logButton.innerHTML = '<?php echo addslashes_js(get_string('scormloggingon', 'scorm')); ?>';
|
||||||
logPopUpWindow.focus();
|
logPopUpWindow.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -747,9 +747,9 @@ logButton.id = 'mod-scorm-log-toggle';
|
||||||
logButton.name = 'logToggle';
|
logButton.name = 'logToggle';
|
||||||
logButton.href = 'javascript:toggleLog();';
|
logButton.href = 'javascript:toggleLog();';
|
||||||
if (getLoggingActive() == "A") {
|
if (getLoggingActive() == "A") {
|
||||||
logButton.innerHTML = '<?php print_string('scormloggingon', 'scorm') ?>';
|
logButton.innerHTML = '<?php echo addslashes_js(get_string('scormloggingon', 'scorm')); ?>';
|
||||||
} else {
|
} else {
|
||||||
logButton.innerHTML = '<?php print_string('scormloggingoff', 'scorm') ?>';
|
logButton.innerHTML = '<?php echo addslashes_js(get_string('scormloggingoff', 'scorm')); ?>';
|
||||||
}
|
}
|
||||||
var content = safeGetElement(document, 'scormpage');
|
var content = safeGetElement(document, 'scormpage');
|
||||||
content.insertBefore(logButton, content.firstChild);
|
content.insertBefore(logButton, content.firstChild);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue