]> git.mxchange.org Git - friendica.git/commitdiff
protect tags from double expansion during RT
authorFriendika <info@friendika.com>
Thu, 17 Mar 2011 02:57:13 +0000 (19:57 -0700)
committerFriendika <info@friendika.com>
Thu, 17 Mar 2011 02:57:13 +0000 (19:57 -0700)
mod/item.php

index 90fb546bce917025c2fd14f435689e60f918c5f5..6e6e822d0cfe1ac9d973f864141837499be8f6f1 100644 (file)
@@ -212,6 +212,8 @@ function item_post(&$a) {
        if(count($tags)) {
                foreach($tags as $tag) {
                        if(strpos($tag,'#') === 0) {
+                               if(strpos($tag,'[url='))
+                                       continue;
                                $basetag = str_replace('_',' ',substr($tag,1));
                                $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
                                if(strlen($str_tags))
@@ -220,6 +222,8 @@ function item_post(&$a) {
                                continue;
                        }
                        if(strpos($tag,'@') === 0) {
+                               if(strpos($tag,'[url='))
+                                       continue;
                                $stat = false;
                                $name = substr($tag,1);
                                if((strpos($name,'@')) || (strpos($name,'http://'))) {