From b64ddcce96ccf15c51c6755afeff3b1918ecd94f Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 22 Apr 2014 15:54:56 +0200 Subject: [PATCH] Accepting "!"-links as tags. (They are used at statusnet for groups) --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/text.php b/include/text.php index 71f75bf313..3b35c0b767 100644 --- a/include/text.php +++ b/include/text.php @@ -749,7 +749,7 @@ function get_tags($s) { // Otherwise pull out single word tags. These can be @nickname, @first_last // and #hash tags. - if(preg_match_all('/([@#][^ \x0D\x0A,;:?]+)([ \x0D\x0A,;:?]|$)/',$s,$match)) { + if(preg_match_all('/([!#@][^ \x0D\x0A,;:?]+)([ \x0D\x0A,;:?]|$)/',$s,$match)) { foreach($match[1] as $mtch) { if(strstr($mtch,"]")) { // we might be inside a bbcode color tag - leave it alone @@ -2168,7 +2168,7 @@ function normalise_openid($s) { function undo_post_tagging($s) { $matches = null; - $cnt = preg_match_all('/([@#])\[url=(.*?)\](.*?)\[\/url\]/ism',$s,$matches,PREG_SET_ORDER); + $cnt = preg_match_all('/([!#@])\[url=(.*?)\](.*?)\[\/url\]/ism',$s,$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { $s = str_replace($mtch[0], $mtch[1] . $mtch[3],$s); -- 2.39.5