From ffae3d461588ed0ee115c259b03f0cf0a3c996ab Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 4 Aug 2004 16:26:44 +0000 Subject: [PATCH] Fixing Bug 812 and problems with slashes when editing text and HTML files Again. --- files/index.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/files/index.php b/files/index.php index 90910ab569cb7..287d59d1595ef 100644 --- a/files/index.php +++ b/files/index.php @@ -317,25 +317,20 @@ function html_header($course, $wdir, $formfield=""){ 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 @@ function html_header($course, $wdir, $formfield=""){ echo "
"; if ($usehtmleditor) { - print_richedit_javascript("form", "text", "yes"); + use_html_editor(); }