Solve this silly mpersand display problem

This commit is contained in:
moodler
2003-01-23 05:03:27 +00:00
parent 66fef9f99f
commit f3e48e6ef0
+3
View File
@@ -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("&", "&amp;", $text);
/// Make lone URLs into links. eg http://moodle.com/
$text = eregi_replace("([\n\r ([])([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])",
"\\1<A HREF=\"\\2://\\3\\4\" TARGET=\"newpage\">\\2://\\3\\4</A>", $text);