Fixed that damn www linking problem with words like wwwroot :-)

This commit is contained in:
moodler
2003-01-02 14:54:33 +00:00
parent 36b4f9852e
commit e1bf736ffa
+1 -1
View File
@@ -506,7 +506,7 @@ function text_to_html($text, $smiley=true, $para=true) {
"\\1<A HREF=\"\\2://\\3\\4\" TARGET=\"newpage\">\\2://\\3\\4</A>", $text);
/// eg www.moodle.com
$text = eregi_replace("([[:space:]])www.([^[:space:]]*)([[:alnum:]#?/&=])",
$text = eregi_replace("([[:space:]])www\.([^[:space:]]*)([[:alnum:]#?/&=])",
"\\1<A HREF=\"http://www.\\2\\3\" TARGET=\"newpage\">www.\\2\\3</A>", $text);
/// Make returns into HTML newlines.