]> git.mxchange.org Git - friendica-addons.git/blobdiff - twitter/twitter.php
Preparations for shared posts
[friendica-addons.git] / twitter / twitter.php
index 6a93d9f15303c059c6928d0e14b0b193285afc60..ee3bd0fbda5467dcc85897f8e327a5bc9ff905c1 100755 (executable)
@@ -294,6 +294,9 @@ function twitter_shortenmsg($b) {
        $recycle = html_entity_decode("◌ ", ENT_QUOTES, 'UTF-8');
        $body = preg_replace( '/'.$recycle.'\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', "\n", $body);
 
+       // remove the share element
+       $body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
+
        // At first convert the text to html
        $html = bbcode($body, false, false);