From: Michael Date: Thu, 25 Jan 2018 14:58:10 +0000 (+0000) Subject: Support for hashtags with "#" inside the link (mastodon style?) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8abc4d25b46c1f5472c41f5bbdab725e06a9508f;p=friendica.git Support for hashtags with "#" inside the link (mastodon style?) --- diff --git a/include/bbcode.php b/include/bbcode.php index 3731e7f449..f95c911d5e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1051,6 +1051,9 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa $Text = preg_replace("/([#])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $Text); + $Text = preg_replace("/\[url\=([$URLSearchString]*)\]#(.*?)\[\/url\]/ism", + '#$2', $Text); + $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '$1', $Text); $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $Text); //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '$2', $Text);