]> git.mxchange.org Git - friendica.git/commitdiff
Accepting "!"-links as tags. (They are used at statusnet for groups)
authorMichael Vogel <icarus@dabo.de>
Tue, 22 Apr 2014 13:54:56 +0000 (15:54 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 22 Apr 2014 13:54:56 +0000 (15:54 +0200)
include/text.php

index 71f75bf31345c94097f1c2490753e4e0d8a62224..3b35c0b7673e603f11fe8c35ec54248ae30b3e69 100644 (file)
@@ -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);