From: Michael Date: Sat, 16 May 2020 18:38:50 +0000 (+0000) Subject: issue 8642: Make hashtags more compatible X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b6257975919209371a59f5fbc1b13e74899a37c5;p=friendica.git issue 8642: Make hashtags more compatible --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 61b71743cb..98c1552930 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1801,12 +1801,16 @@ class BBCode * - #[url=][/url] * - [url=]#[/url] */ - $text = preg_replace_callback("/(?:#\[url\=[^\[\]]*\]|\[url\=[^\[\]]*\]#)(.*?)\[\/url\]/ism", function($matches) { - return '#'; + $text = preg_replace_callback("/(?:#\[url\=[^\[\]]*\]|\[url\=[^\[\]]*\]#)(.*?)\[\/url\]/ism", function($matches) use ($simple_html) { + if ($simple_html == BBCode::ACTIVITYPUB) { + return '#' + . XML::escape($matches[1]) . ''; + } else { + return '#'; + } }, $text); // We need no target="_blank" rel="noopener noreferrer" for local links