]> git.mjollnir.org Git - moodle.git/commitdiff
Find URLs at the beginning of lines ...
authormoodler <moodler>
Fri, 18 Oct 2002 17:05:17 +0000 (17:05 +0000)
committermoodler <moodler>
Fri, 18 Oct 2002 17:05:17 +0000 (17:05 +0000)
lib/weblib.php

index 7289c456c377ecc932743906cd5be7391eea7a17..1b3b295b0dc2518c0c839885041c1e2f08526329 100644 (file)
@@ -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<A HREF=\"\\2://\\3\\4\" TARGET=\"newpage\">\\2://\\3\\4</A>", $text);
 
     // eg www.moodle.com