From 7614ae40ef57c0a2b92e7186791e6f6d380f9d9c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 4 Apr 2014 10:44:42 +0200 Subject: [PATCH] When converting to plain text, links behind @-addresses are now removed --- include/api.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } -- 2.39.5