From: Craig Andrews Date: Mon, 2 Nov 2009 17:57:51 +0000 (-0500) Subject: allow <> to surround the url (like () or []) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1cf67f4f714be45cf93302f223a58c65402e3038;p=quix0rs-gnu-social.git allow <> to surround the url (like () or []) --- diff --git a/lib/util.php b/lib/util.php index 31a78a876a..ed7e10f6bd 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('.','?',',','#');