From: moodler Date: Wed, 4 Aug 2004 16:26:44 +0000 (+0000) Subject: Fixing Bug 812 and problems with slashes when editing text and HTML files X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ffae3d461588ed0ee115c259b03f0cf0a3c996ab;p=moodle.git Fixing Bug 812 and problems with slashes when editing text and HTML files Again. --- diff --git a/files/index.php b/files/index.php index 90910ab569..287d59d159 100644 --- a/files/index.php +++ b/files/index.php @@ -317,25 +317,20 @@ fclose($fileptr); if (mimeinfo("type", $file) == "text/html") { - if ($usehtmleditor = can_use_richtext_editor()) { - $onsubmit = "onsubmit=\"copyrichtext(document.form.text);\""; - } else { - $onsubmit = ""; - } + $usehtmleditor = can_use_html_editor(); } else { $usehtmleditor = false; - $onsubmit = ""; } print_heading("$streditfile"); echo "
"; - echo "
"; + echo ""; echo " "; echo " "; echo " "; echo " "; - print_textarea($usehtmleditor, 25, 80, 680, 400, "text", addslashes($contents)); + print_textarea($usehtmleditor, 25, 80, 680, 400, "text", $contents); echo "
"; echo " "; echo ""; @@ -349,7 +344,7 @@ echo "
"; if ($usehtmleditor) { - print_richedit_javascript("form", "text", "yes"); + use_html_editor(); }