From f4ba7e1a54f4798ddc27fa4e5f14d11ac64cc4a0 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 3 Jan 2007 14:44:17 +0000 Subject: [PATCH] Bend over for XHTML 1.0 Strict ... MDL-8049 Removed Javascript language attribute tags and added CDATA --- admin/xmldb/javascript.php | 4 +- backup/backup_form.html | 2 +- backup/restore_form.html | 2 +- blocks/loancalc/block_loancalc.php | 6 +- blog/tags.php | 4 +- calendar/export_basic.html | 2 +- files/index.php | 12 +- grade/exceptions.html | 8 +- lib/editor/htmlarea/htmlarea.class.php | 16 +- lib/editor/htmlarea/popups/createanchor.php | 10 +- lib/editor/htmlarea/popups/dlg_ins_char.php | 6 +- lib/editor/htmlarea/popups/dlg_ins_smile.php | 10 +- lib/editor/htmlarea/popups/insert_image.php | 4 +- .../htmlarea/popups/insert_image_std.php | 6 +- lib/editor/htmlarea/popups/insert_table.php | 7 +- lib/editor/htmlarea/popups/link.php | 8 +- lib/editor/htmlarea/popups/link_std.php | 6 +- .../htmlarea/popups/searchandreplace.php | 8 +- lib/editor/tinymce/tinymce.class.php | 8 +- lib/formslib.php | 2 +- lib/moodlelib.php | 342 ++---------------- lib/soap/nusoap.php | 6 +- lib/speller/server-scripts/spellchecker.php | 10 +- lib/weblib.php | 10 +- message/index.php | 2 +- mod/assignment/mod.html | 4 +- mod/chat/chatd.php | 6 +- mod/chat/gui_header_js/chatinput.php | 2 +- mod/chat/gui_header_js/insert.php | 4 +- mod/chat/gui_header_js/jsupdated.php | 4 +- mod/chat/gui_header_js/users.php | 2 +- mod/data/templates.php | 2 +- mod/hotpot/lib.php | 8 +- mod/hotpot/mod.html | 6 +- mod/hotpot/report/fullstat/report.php | 12 +- mod/hotpot/show.php | 6 +- mod/hotpot/view.php | 4 +- mod/lams/mod.html | 6 +- mod/quiz/attempt.php | 12 +- mod/quiz/attempt_close_js.php | 6 +- mod/quiz/config.html | 6 +- mod/quiz/jsclock.php | 6 +- mod/quiz/jstimer.php | 14 +- mod/quiz/protect_js.php | 2 +- mod/quiz/view.php | 8 +- mod/resource/type/file/file.html | 14 +- mod/resource/type/file/localfile.php | 6 +- mod/resource/type/file/localpath.php | 12 +- mod/resource/type/html/html.html | 14 +- mod/resource/type/ims/ims.html | 20 +- .../type/repository/hive/makelink.php | 6 +- .../type/repository/hive/openhive.php | 4 +- mod/resource/type/repository/repository.html | 18 +- mod/resource/type/text/text.html | 14 +- mod/scorm/datamodels/aicclib.php | 8 +- mod/scorm/datamodels/scorm_12lib.php | 8 +- mod/scorm/datamodels/scorm_13lib.php | 8 +- mod/scorm/loadSCO.php | 8 +- mod/scorm/mod.html | 6 +- mod/scorm/player.php | 17 +- mod/wiki/ewiki/ewiki.php | 2 +- mod/wiki/ewiki/fragments/homepage.src | 4 +- question/type/calculated/editquestion.html | 4 +- theme/standardwhite/footer.html | 16 +- 64 files changed, 308 insertions(+), 502 deletions(-) diff --git a/admin/xmldb/javascript.php b/admin/xmldb/javascript.php index abf86cd597..4513c97d38 100644 --- a/admin/xmldb/javascript.php +++ b/admin/xmldb/javascript.php @@ -42,14 +42,14 @@ $file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js'; $wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js'; if (file_exists($file) && is_readable($file)) { - echo '' . "\n"; + echo '' . "\n"; } else { /// Try to load the postaction javascript if exists if ($postaction) { $file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js'; $wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js'; if (file_exists($file) && is_readable($file)) { - echo '' . "\n"; + echo '' . "\n"; } } } diff --git a/backup/backup_form.html b/backup/backup_form.html index 9d6bfd9aa8..534eac496e 100644 --- a/backup/backup_form.html +++ b/backup/backup_form.html @@ -72,7 +72,7 @@ ?> - - - +//]]> diff --git a/lib/editor/htmlarea/htmlarea.class.php b/lib/editor/htmlarea/htmlarea.class.php index 1f33620402..7d4af69b8e 100644 --- a/lib/editor/htmlarea/htmlarea.class.php +++ b/lib/editor/htmlarea/htmlarea.class.php @@ -234,8 +234,8 @@ class htmlarea extends editorObject { } echo "\n"; - echo ''."\n"; } @@ -340,15 +340,15 @@ class htmlarea extends editorObject { */ function print_speller_code ($usehtmleditor=false) { - if(!$usehtmleditor) { - echo "\n".''."\n"; } else { echo "\n\tfunction spellClickHandler(editor, buttonId) {\n"; echo "\t\teditor._textArea.value = editor.getHTML();\n"; @@ -360,7 +360,9 @@ class htmlarea extends editorObject { echo "\t\tspeller.openChecker();\n\t"; echo '}'."\n"; } + echo '//]]>'."\n"; + echo ''."\n"; } } -?> \ No newline at end of file +?> diff --git a/lib/editor/htmlarea/popups/createanchor.php b/lib/editor/htmlarea/popups/createanchor.php index 93b54a909b..034be6c6f8 100644 --- a/lib/editor/htmlarea/popups/createanchor.php +++ b/lib/editor/htmlarea/popups/createanchor.php @@ -7,9 +7,9 @@ Create anchor - - diff --git a/lib/editor/htmlarea/popups/dlg_ins_char.php b/lib/editor/htmlarea/popups/dlg_ins_char.php index c18eb7f9f9..ea5b0bda3d 100644 --- a/lib/editor/htmlarea/popups/dlg_ins_char.php +++ b/lib/editor/htmlarea/popups/dlg_ins_char.php @@ -67,8 +67,8 @@ form { padding: 0px; margin: 0px; } font-size: small; } // --> - - + - @@ -122,4 +122,4 @@ function cancel() { - \ No newline at end of file + diff --git a/lib/editor/htmlarea/popups/insert_image.php b/lib/editor/htmlarea/popups/insert_image.php index 9fcd8a76cd..8adeae2824 100644 --- a/lib/editor/htmlarea/popups/insert_image.php +++ b/lib/editor/htmlarea/popups/insert_image.php @@ -17,8 +17,8 @@ <?php print_string("insertimage","editor");?> - - + + - - diff --git a/lib/speller/server-scripts/spellchecker.php b/lib/speller/server-scripts/spellchecker.php index 9c2cb716c9..841da0346b 100644 --- a/lib/speller/server-scripts/spellchecker.php +++ b/lib/speller/server-scripts/spellchecker.php @@ -195,8 +195,9 @@ function print_checker_results() { - - + diff --git a/lib/weblib.php b/lib/weblib.php index 450e845e2d..c6c614e4f4 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3720,7 +3720,7 @@ function use_html_editor($name='', $editorhidebuttons='', $id='') { if ($id === '') { $id = 'edit-'.$name; } - echo "\n".''."\n"; } else { - $str .= "\nfunction spellClickHandler(editor, buttonId) {\n"; + $str .= "function spellClickHandler(editor, buttonId) {\n"; $str .= "\teditor._textArea.value = editor.getHTML();\n"; $str .= "\tvar speller = new spellChecker( editor._textArea );\n"; $str .= "\tspeller.popUpUrl = \"" . $CFG->wwwroot ."/lib/speller/spellchecker.html\";\n"; @@ -5206,6 +5206,8 @@ function print_speller_code ($usehtmleditor=false, $return=false) { $str .= "\tspeller.openChecker();\n"; $str .= '}'."\n"; } + $str .= '//]]>'."\n"; + $str .= ''."\n"; if ($return) { return $str; } diff --git a/message/index.php b/message/index.php index 9bdf89cda9..7f12d4388f 100644 --- a/message/index.php +++ b/message/index.php @@ -25,7 +25,7 @@ /// Popup a window if required and quit (usually from external links). if ($popup) { print_header(); - echo '"; + echo '"; redirect("$CFG->wwwroot/"); exit; } diff --git a/mod/assignment/mod.html b/mod/assignment/mod.html index bba84f6bf7..ac83366a5a 100644 --- a/mod/assignment/mod.html +++ b/mod/assignment/mod.html @@ -30,9 +30,11 @@ } ?> -
diff --git a/mod/chat/chatd.php b/mod/chat/chatd.php index bb41bf9e8a..a6dd9d883d 100755 --- a/mod/chat/chatd.php +++ b/mod/chat/chatd.php @@ -247,8 +247,8 @@ class ChatDaemon { ob_start(); echo ''; - echo ''; echo ''; diff --git a/mod/chat/gui_header_js/chatinput.php b/mod/chat/gui_header_js/chatinput.php index 30f5190a34..5ef4bb8ddb 100644 --- a/mod/chat/gui_header_js/chatinput.php +++ b/mod/chat/gui_header_js/chatinput.php @@ -27,7 +27,7 @@ ob_start(); ?> - '; } else { - echo ''."\n"; + $script = ''."\n"; $this->html = preg_replace('||i', $script.'', $this->html, 1); } function insert_submission_form($attemptid, $startblock, $endblock, $keep_contents=false) { @@ -2365,8 +2365,8 @@ function hotpot_print_show_links($course, $location, $reference, $actions='', $s } $strenterafilename = get_string('enterafilename', 'hotpot'); $html = << - +//]]> END_OF_SCRIPT; diff --git a/mod/hotpot/mod.html b/mod/hotpot/mod.html index 88a0ceacf6..7dddc45aa5 100644 --- a/mod/hotpot/mod.html +++ b/mod/hotpot/mod.html @@ -20,8 +20,8 @@ $text_source_options = array( HOTPOT_TEXTSOURCE_SPECIFIC => get_string("textsourcespecific", "hotpot") ); ?> -
diff --git a/mod/hotpot/report/fullstat/report.php b/mod/hotpot/report/fullstat/report.php index f038e9f4d8..42f387dc23 100644 --- a/mod/hotpot/report/fullstat/report.php +++ b/mod/hotpot/report/fullstat/report.php @@ -397,8 +397,8 @@ function hotpot_showhide_button($id) { $pref = '1'; $text = ($pref=='1' ? $hide : $show); return << - +//]]> SHOWHIDE_BUTTON ; } function hotpot_showhide_set($id) { return << - +//]]> SHOWHIDE_SET ; diff --git a/mod/hotpot/show.php b/mod/hotpot/show.php index 13122c3102..f55a7a7db1 100644 --- a/mod/hotpot/show.php +++ b/mod/hotpot/show.php @@ -22,8 +22,8 @@ print_header($title, $title); hotpot_print_show_links($params->course, $params->location, $params->reference); ?> - $str) { $js .= 'FEEDBACK['.$i."] = $str;\n"; } - $js = '\n"; + $js = '\n"; $hp->html = preg_replace('||i', "$js", $hp->html, 1); } // insert hot-potatoes.js @@ -411,7 +411,7 @@ default: $iframe_id = 'hotpot_iframe'; $body_tags = " onload=\"set_iframe_height('$iframe_id')\""; - $iframe_js = ''."\n"; + $iframe_js = ''."\n"; print_header( $title, $heading, $navigation, "", $head.$styles.$scripts.$iframe_js, true, $button, diff --git a/mod/lams/mod.html b/mod/lams/mod.html index e47a5c94a6..c18de9788c 100644 --- a/mod/lams/mod.html +++ b/mod/lams/mod.html @@ -106,8 +106,8 @@ print_textarea($usehtmleditor, 20, 50, 680, 400, "introduction", $form->introduc - diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 23c1e0d4b8..d9c2966fb6 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -470,13 +470,13 @@ if($quiz->timelimit > 0) { // Make sure javascript is enabled for time limited quizzes ?> - layout); if ($numpages > 1) { ?> - \n"; diff --git a/mod/quiz/attempt_close_js.php b/mod/quiz/attempt_close_js.php index 7f62686aea..4932b57470 100644 --- a/mod/quiz/attempt_close_js.php +++ b/mod/quiz/attempt_close_js.php @@ -5,13 +5,13 @@ if (!empty($popup)) { ?> -
@@ -43,8 +43,8 @@ var ec_quiz_finish = ec_page_start + ;
- diff --git a/mod/quiz/protect_js.php b/mod/quiz/protect_js.php index cfe5f961bc..a6f9c47e05 100644 --- a/mod/quiz/protect_js.php +++ b/mod/quiz/protect_js.php @@ -20,7 +20,7 @@ - - @@ -70,9 +72,11 @@ onclick="lockoptions('form', 'windowpopup[0]', frameitem); @@ -116,11 +120,15 @@ "; + echo "\n//\n"; echo ""; } else { echo ""; } ?> @@ -190,9 +198,11 @@ for ($i=0; $i < $this->maxparameters; $i++) { - diff --git a/mod/resource/type/file/localfile.php b/mod/resource/type/file/localfile.php index 6dd63e2d8c..f953081081 100644 --- a/mod/resource/type/file/localfile.php +++ b/mod/resource/type/file/localfile.php @@ -18,8 +18,8 @@ $chooseparts = explode('.', $choose); ?> -
diff --git a/mod/resource/type/file/localpath.php b/mod/resource/type/file/localpath.php index ed177b38de..09bd9100fb 100644 --- a/mod/resource/type/file/localpath.php +++ b/mod/resource/type/file/localpath.php @@ -10,10 +10,10 @@ set_user_preference('resource_localpath', $pathname); } ?> - wwwroot.'/user/edit.php?course='.SITEID), 'center'); ?> -
diff --git a/mod/resource/type/html/html.html b/mod/resource/type/html/html.html index fbc3c39753..e73c79859d 100644 --- a/mod/resource/type/html/html.html +++ b/mod/resource/type/html/html.html @@ -3,7 +3,8 @@ - @@ -63,9 +65,11 @@ onclick="lockoptions('form', 'windowpopup[0]', blockitem); @@ -109,9 +113,9 @@
"; + echo ""; + echo "\n//]]>\n"; } ?> @@ -123,8 +127,10 @@ - diff --git a/mod/resource/type/ims/ims.html b/mod/resource/type/ims/ims.html index 674d1ac62e..9969ec7911 100644 --- a/mod/resource/type/ims/ims.html +++ b/mod/resource/type/ims/ims.html @@ -29,7 +29,8 @@ - @@ -113,8 +115,10 @@ onclick="lockoptions('form', 'windowpopup[1]', popupitems);" /> @@ -153,13 +157,13 @@
"; + echo ""; + echo "\n//]]>\n"; } else { - echo ""; + echo "\n//]]>\n"; } ?> @@ -245,13 +249,13 @@ - - diff --git a/mod/resource/type/repository/hive/makelink.php b/mod/resource/type/repository/hive/makelink.php index 84a37e9638..1889f774bd 100644 --- a/mod/resource/type/repository/hive/makelink.php +++ b/mod/resource/type/repository/hive/makelink.php @@ -30,13 +30,13 @@ ?> - diff --git a/mod/resource/type/repository/hive/openhive.php b/mod/resource/type/repository/hive/openhive.php index f9111dea03..0df673eab9 100644 --- a/mod/resource/type/repository/hive/openhive.php +++ b/mod/resource/type/repository/hive/openhive.php @@ -60,8 +60,10 @@ $query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION; echo ''; echo ''; echo ''; - echo ''; print_footer(); diff --git a/mod/resource/type/repository/repository.html b/mod/resource/type/repository/repository.html index bb4ba8619a..d18b63b4b1 100644 --- a/mod/resource/type/repository/repository.html +++ b/mod/resource/type/repository/repository.html @@ -3,7 +3,8 @@ - @@ -84,9 +86,11 @@ onclick="lockoptions('form', 'windowpopup[0]', frameitem); @@ -129,13 +133,13 @@
"; + echo ""; + echo "\n//]]>\n"; } else { - echo ""; + echo "\n//]]>\n"; } ?> @@ -204,9 +208,11 @@ for ($i=0; $i < $this->maxparameters; $i++) { - diff --git a/mod/resource/type/text/text.html b/mod/resource/type/text/text.html index 2723292f65..1789778a2c 100644 --- a/mod/resource/type/text/text.html +++ b/mod/resource/type/text/text.html @@ -1,7 +1,8 @@ - @@ -76,9 +78,11 @@ " onclick="lockoptions('form', 'windowpopup[0]', blockitem); @@ -124,9 +128,9 @@
"; + echo ""; + echo "\n//]]>\n"; } ?> @@ -138,8 +142,10 @@ - diff --git a/mod/scorm/datamodels/aicclib.php b/mod/scorm/datamodels/aicclib.php index 7881fb61a9..3fea46ca1b 100644 --- a/mod/scorm/datamodels/aicclib.php +++ b/mod/scorm/datamodels/aicclib.php @@ -1,4 +1,4 @@ -toc .= "\t\n"; if ($scorm->hidetoc == 0) { $result->toc .= ' - '."\n"; } diff --git a/mod/scorm/datamodels/scorm_12lib.php b/mod/scorm/datamodels/scorm_12lib.php index c5caf14e5f..f4c9f929a9 100644 --- a/mod/scorm/datamodels/scorm_12lib.php +++ b/mod/scorm/datamodels/scorm_12lib.php @@ -1,4 +1,4 @@ -toc .= "\t\n"; if ($scorm->hidetoc == 0) { $result->toc .= ' - '."\n"; } diff --git a/mod/scorm/datamodels/scorm_13lib.php b/mod/scorm/datamodels/scorm_13lib.php index 9a25e752dd..852e37c5f1 100644 --- a/mod/scorm/datamodels/scorm_13lib.php +++ b/mod/scorm/datamodels/scorm_13lib.php @@ -1,4 +1,4 @@ -toc .= "\t\n"; if ($scorm->hidetoc == 0) { $result->toc .= ' - '."\n"; } diff --git a/mod/scorm/loadSCO.php b/mod/scorm/loadSCO.php index 1d32290dc4..0a144ac012 100755 --- a/mod/scorm/loadSCO.php +++ b/mod/scorm/loadSCO.php @@ -1,4 +1,4 @@ - LoadSCO -