]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11295 editorshortcutshelpbutton breaking xhtml strict
authorskodak <skodak>
Sat, 15 Sep 2007 19:36:31 +0000 (19:36 +0000)
committerskodak <skodak>
Sat, 15 Sep 2007 19:36:31 +0000 (19:36 +0000)
lib/weblib.php

index 219fb95817b4eeed6094149d3402dc31e95307bd..3fd2e540c96baef4484e76d5ee1048c4bcf43626 100644 (file)
@@ -4327,8 +4327,11 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
 
     if ($usehtmleditor) {
         // Show shortcuts button if HTML editor is in use, but only if JavaScript is enabled (MDL-9556)
-        $str .= '<script type="text/javascript">document.write(\''.
-            str_replace('\'','\\\'',editorshortcutshelpbutton()).'\'); </script>';
+        $str .= '<script type="text/javascript">
+//<![CDATA[
+document.write(\''.addslashes_js(editorshortcutshelpbutton()).'\');
+//]]>
+</script>';
     }
 
     if ($return) {