From: Peter Liebetrau Date: Fri, 25 Jan 2019 16:33:25 +0000 (+0100) Subject: BBCode - fixed syntax error X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=41663c7592abe55a958632c3a48265e0a8544d2b;p=friendica.git BBCode - fixed syntax error --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 24118ef577..2c2054750c 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1364,8 +1364,8 @@ class BBCode extends BaseObject // We need no target="_blank" for local links // convert links start with System::baseUrl() as local link without the target="_blank" attribute $escapedBaseUrl = preg_quote(System::baseUrl(), '/'); - $text = preg_replace("/\[url\]($escapedBaseUrl[$URLSearchString]*)\[\/url\]/ism", '$1', $text); - $text = preg_replace("/\[url\=($escapedBaseUrl[$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $text); + $text = preg_replace("/\[url\](".$escapedBaseUrl."[$URLSearchString]*)\[\/url\]/ism", '$1', $text); + $text = preg_replace("/\[url\=(".$escapedBaseUrl."[$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $text); $text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '$1', $text); $text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $text);