]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
allow <> to surround the url (like () or [])
authorCraig Andrews <candrews@integralblue.com>
Mon, 2 Nov 2009 17:57:51 +0000 (12:57 -0500)
committerCraig Andrews <candrews@integralblue.com>
Mon, 2 Nov 2009 17:59:11 +0000 (12:59 -0500)
lib/util.php

index 31a78a876a529f253318148348f151cbe3b15fdf..ed7e10f6bd465b5bdaa350413b008022a9ed6a82 100644 (file)
@@ -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('.','?',',','#');