From f3e48e6ef0a46bb2f909001c7d0c724239249c92 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 23 Jan 2003 05:03:27 +0000 Subject: [PATCH] Solve this silly mpersand display problem --- lib/weblib.php | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5