Skip to content

Commit

Permalink
cosmetic fix in format text FORMAT_HTML now used after text is conver…
Browse files Browse the repository at this point in the history
…ted to html instead of the original format - the actual function is not changed, no need to backport
  • Loading branch information
skodak committed Jan 20, 2007
1 parent ed5dd29 commit 5c6347c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/weblib.php
Expand Up @@ -1234,15 +1234,15 @@ 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);
}
break;

case FORMAT_PLAIN:
$text = s($text);
$text = s($text); // cleans dangerous JS
$text = rebuildnolinktag($text);
$text = str_replace(' ', '  ', $text);
$text = nl2br($text);
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 5c6347c

Please sign in to comment.