]> git.mxchange.org Git - friendica.git/commitdiff
BBCode - fixed syntax error
authorPeter Liebetrau <peter.liebetrau@gmail.com>
Fri, 25 Jan 2019 16:33:25 +0000 (17:33 +0100)
committerPeter Liebetrau <peter.liebetrau@gmail.com>
Fri, 25 Jan 2019 16:33:25 +0000 (17:33 +0100)
src/Content/Text/BBCode.php

index 24118ef57750f17bede2624ecf2b86c7c4ae01f0..2c2054750c5f0d06fb631b66d0ee65fe97ac034c 100644 (file)
@@ -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", '<a href="$1">$1</a>', $text);
-               $text = preg_replace("/\[url\=($escapedBaseUrl[$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1">$2</a>', $text);         
+               $text = preg_replace("/\[url\](".$escapedBaseUrl."[$URLSearchString]*)\[\/url\]/ism", '<a href="$1">$1</a>', $text);
+               $text = preg_replace("/\[url\=(".$escapedBaseUrl."[$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1">$2</a>', $text);             
 
                $text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$1</a>', $text);
                $text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $text);