From 8abc4d25b46c1f5472c41f5bbdab725e06a9508f Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 25 Jan 2018 14:58:10 +0000 Subject: [PATCH] Support for hashtags with "#" inside the link (mastodon style?) --- include/bbcode.php | 3 +++ 1 file changed, 3 insertions(+) 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);