From cda94ae1b8dea2166fb38b1179fe54f290a5ee2f Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 29 Oct 2005 21:40:41 +0000 Subject: [PATCH] fixed cleaning before editing SC#163; merged from MOODLE_15_STABLE --- mod/glossary/comment.html | 15 ++++++++++++--- mod/glossary/edit.html | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/mod/glossary/comment.html b/mod/glossary/comment.html index 66cdbcf248b..fa2117140f2 100644 --- a/mod/glossary/comment.html +++ b/mod/glossary/comment.html @@ -1,3 +1,15 @@ +format)) { + $form->format = $defaultformat; + } + if ($usehtmleditor) { //clean and convert before editing + $options = new object(); + $options->smiley = false; + $options->filter = false; + $form->text = format_text($form->text, $form->format, $options); + $form->format = FORMAT_HTML; + } +?>
@@ -30,9 +42,6 @@ print_string('formathtml'); echo ''; } else { - if (!isset($form->format)) { - $form->format = $defaultformat; - } choose_from_menu(format_text_menu(), "format", $form->format, ""); } helpbutton("textformat", get_string("helpformatting")); diff --git a/mod/glossary/edit.html b/mod/glossary/edit.html index 1d71b3b5e75..c1e2896d482 100644 --- a/mod/glossary/edit.html +++ b/mod/glossary/edit.html @@ -1,3 +1,15 @@ +format)) { + $newentry->format = $defaultformat; + } + if ($usehtmleditor) { //clean and convert before editing + $options = new object(); + $options->smiley = false; + $options->filter = false; + $newentry->definition = format_text($newentry->definition, $newentry->format, $options); + $newentry->format = FORMAT_HTML; + } +?>
'; } else { - if (!isset($newentry->format)) { - $newentry->format = $defaultformat; - } choose_from_menu(format_text_menu(), "format", $newentry->format, ""); } helpbutton("textformat", get_string("helpformatting"));