]> git.mxchange.org Git - friendica.git/commitdiff
When converting to plain text, links behind @-addresses are now removed
authorMichael Vogel <icarus@dabo.de>
Fri, 4 Apr 2014 08:44:42 +0000 (10:44 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 4 Apr 2014 08:44:42 +0000 (10:44 +0200)
include/api.php

index ea1ba27e4019af7b8974361ae0e45cd63452b639..74586850f8d8f8a797916ea638bfb8bd09fec8f7 100644 (file)
@@ -2420,10 +2420,11 @@ function api_clean_plain_items($Text) {
 
        $Text = bb_CleanPictureLinks($Text);
 
-       if ($include_entities == "true") {
-               $URLSearchString = "^\[\]";
+       $URLSearchString = "^\[\]";
 
-               $Text = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",'#$2',$Text);
+       $Text = preg_replace("/([!#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",'$1$3',$Text);
+
+       if ($include_entities == "true") {
                $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",'[url=$1]$1[/url]',$Text);
        }