From: moodler Date: Thu, 23 Jan 2003 05:03:27 +0000 (+0000) Subject: Solve this silly mpersand display problem X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f3e48e6ef0a46bb2f909001c7d0c724239249c92;p=moodle.git Solve this silly mpersand display problem --- diff --git a/lib/weblib.php b/lib/weblib.php index 3a476cc51c..c6130b138d 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -521,6 +521,9 @@ function text_to_html($text, $smiley=true, $para=true) { $text = eregi_replace("([\n\r])<", " <", $text); $text = eregi_replace(">([\n\r])", "> ", $text); +/// Replace ampersands + $text = eregi_replace("&", "&", $text); + /// Make lone URLs into links. eg http://moodle.com/ $text = eregi_replace("([\n\r ([])([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "\\1\\2://\\3\\4", $text);