From: Michael Vogel Date: Fri, 4 Apr 2014 08:44:42 +0000 (+0200) Subject: When converting to plain text, links behind @-addresses are now removed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7614ae40ef57c0a2b92e7186791e6f6d380f9d9c;p=friendica.git When converting to plain text, links behind @-addresses are now removed --- diff --git a/include/api.php b/include/api.php index ea1ba27e40..74586850f8 100644 --- a/include/api.php +++ b/include/api.php @@ -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); }