]> git.mxchange.org Git - friendica.git/commitdiff
Issue 4227: Make hash tags always local links
authorMichael <heluecht@pirati.ca>
Wed, 24 Jan 2018 21:37:12 +0000 (21:37 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 24 Jan 2018 21:37:12 +0000 (21:37 +0000)
include/bbcode.php

index df883eed64aa79e100476252149edf4b50ad0011..3731e7f449551ddc2fadef663760078b4149379c 100644 (file)
@@ -1049,7 +1049,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        $Text = preg_replace($expression, System::baseUrl()."/display/$1", $Text);
 
        $Text = preg_replace("/([#])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
-                               '$1<a href="$2" class="tag" title="$3">$3</a>', $Text);
+                               '$1<a href="' . System::baseUrl() . '/search?tag=$3" class="tag" title="$3">$3</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);