diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-11-02 12:57:51 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-11-02 12:59:11 -0500 |
commit | 1cf67f4f714be45cf93302f223a58c65402e3038 (patch) | |
tree | c9b10ff012a7996d9caaf975ee263252e92a267a /lib | |
parent | 8b7bce12f8d2ca5efdd744bcb09dcf1f8e5f645a (diff) |
allow <> to surround the url (like () or [])
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index 31a78a876..ed7e10f6b 100644 --- a/lib/util.php +++ b/lib/util.php @@ -422,7 +422,7 @@ function common_render_text($text) function common_replace_urls_callback($text, $callback, $notice_id = null) { // Start off with a regex $regex = '#'. - '(?:^|[\s\(\)\[\]\{\}\\\'\\\";]+)(?![\@\!\#])'. + '(?:^|[\s\<\>\(\)\[\]\{\}\\\'\\\";]+)(?![\@\!\#])'. '('. '(?:'. '(?:'. //Known protocols @@ -480,6 +480,10 @@ function callback_helper($matches, $callback, $notice_id) { array( 'left'=>'{', 'right'=>'}' + ), + array( + 'left'=>'<', + 'right'=>'>' ) ); $cannotEndWith=array('.','?',',','#'); |