From: moodler Date: Fri, 18 Oct 2002 17:05:17 +0000 (+0000) Subject: Find URLs at the beginning of lines ... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0be05df068570e6a52f3afe64e4c1638b5a355c0;p=moodle.git Find URLs at the beginning of lines ... --- diff --git a/lib/weblib.php b/lib/weblib.php index 7289c456c3..1b3b295b0d 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