Added CDATA to Javascript

This commit is contained in:
moodler 2006-12-22 04:19:52 +00:00
parent ad897001c2
commit ce926cb8d8
2 changed files with 6 additions and 6 deletions

View File

@ -129,7 +129,7 @@ class block_admin_tree extends block_base {
$this->content = new stdClass;
$this->content->text = '<script type="text/javascript">'."\n";
$this->content->text .= '<!--' . "\n";
$this->content->text .= '//<![CDATA[' . "\n";
$this->content->text .= 'var vh_numspans = ' . ($this->spancounter - 1) . ';' . "\n";
$this->content->text .= 'var vh_content = new Array();' . "\n";
$this->content->text .= 'function getspan(spanid) {' . "\n";
@ -177,7 +177,7 @@ class block_admin_tree extends block_base {
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";
$this->content->text .= '-->' . "\n";
$this->content->text .= '//]]>' . "\n";
$this->content->text .= '</script>' . "\n";
$this->content->text .= '<div align="left">' . "\n";
@ -185,11 +185,11 @@ class block_admin_tree extends block_base {
$this->content->text .= '</div>' . "\n";
$this->content->text .= '<script type="text/javascript">' . "\n";
$this->content->text .= '<!--' . "\n";
$this->content->text .= '//<![CDATA[' . "\n";
$this->content->text .= 'collapseall();' . "\n";
$this->content->text .= $this->expandjavascript;
$this->content->text .= '-->' . "\n";
$this->content->text .= '//]]>' . "\n";
$this->content->text .= '</script>' . "\n";
$searchcontent = isset($CFG->adminsearchquery) ? $CFG->adminsearchquery : '';

View File

@ -1016,9 +1016,9 @@ function popup_form($common, $options, $formname, $selected='', $nothing='choose
$output .= '<div id="noscript'.$formname.'" style="display: inline;">';
$output .= '<input type="submit" value="'.$go.'" /></div>';
$output .= '<script type="text/javascript">'.
"\n<!--\n".
"\n//<![CDATA[\n".
'document.getElementById("noscript'.$formname.'").style.display = "none";'.
"\n-->\n".'</script>';
"\n//]]>\n".'</script>';
$output .= '</form>' . "\n";
if ($help) {