diff --git a/lib/weblib.php b/lib/weblib.php index 7289c456c37..1b3b295b0dc 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -410,7 +410,7 @@ function text_to_html($text, $smiley=true, $para=true) { $text = eregi_replace(">([\n\r])", "> ", $text); // Make lone URLs into links. eg http://moodle.com/ - $text = eregi_replace("([ ([])([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", + $text = eregi_replace("([\n\r ([])([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "\\1\\2://\\3\\4", $text); // eg www.moodle.com