From 5c6347ceebd0a7dd096f0dd8fd9825e0634d3607 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 20 Jan 2007 13:36:03 +0000 Subject: [PATCH] cosmetic fix in format text FORMAT_HTML now used after text is converted to html instead of the original format - the actual function is not changed, no need to backport --- lib/weblib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 3e9cbb2e6d..ce359890a4 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1234,7 +1234,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL replace_smilies($text); } if (!$options->noclean) { - $text = clean_text($text, $format); + $text = clean_text($text, FORMAT_HTML); } if ($options->filter) { $text = filter_text($text, $courseid); @@ -1242,7 +1242,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL break; case FORMAT_PLAIN: - $text = s($text); + $text = s($text); // cleans dangerous JS $text = rebuildnolinktag($text); $text = str_replace(' ', '  ', $text); $text = nl2br($text); @@ -1262,7 +1262,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL replace_smilies($text); } if (!$options->noclean) { - $text = clean_text($text, $format); + $text = clean_text($text, FORMAT_HTML); } if ($options->filter) { @@ -1273,7 +1273,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL default: // FORMAT_MOODLE or anything else $text = text_to_html($text, $options->smiley, $options->para, $options->newlines); if (!$options->noclean) { - $text = clean_text($text, $format); + $text = clean_text($text, FORMAT_HTML); } if ($options->filter) { -- 2.39.5