mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Find URLs at the beginning of lines ...
This commit is contained in:
parent
958aafe2b4
commit
0be05df068
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user