From: moodler Date: Wed, 5 Feb 2003 12:41:59 +0000 (+0000) Subject: Provide the possibility that the format of a text is not defined properly X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=73f8658c36f4d8e22b60f53f3b859a3c5234a659;p=moodle.git Provide the possibility that the format of a text is not defined properly --- diff --git a/lib/weblib.php b/lib/weblib.php index 536d1673f1..0edaf2324f 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -473,7 +473,12 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL) { /// $format is one of the format constants, defined above switch ($format) { - case FORMAT_MOODLE: + case FORMAT_HTML: + $text = replace_smilies($text); + return $text; + break; + + default: // FORMAT_MOODLE or anything else if (!isset($options->smiley)) { $options->smiley=true; } @@ -482,11 +487,6 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL) { } return text_to_html($text, $options->smiley, $options->para); break; - - case FORMAT_HTML: - $text = replace_smilies($text); - return $text; - break; } }