(hopefully) fix preview issue with tags on Mastodon

This commit is contained in:
Michael 2019-10-27 17:41:47 +00:00
parent 4176acc710
commit 60eb6603bf

View File

@ -1748,7 +1748,7 @@ class BBCode extends BaseObject
$text = preg_replace_callback("/(?:#\[url\=.*?\]|\[url\=.*?\]#)(.*?)\[\/url\]/ism", function($matches) { $text = preg_replace_callback("/(?:#\[url\=.*?\]|\[url\=.*?\]#)(.*?)\[\/url\]/ism", function($matches) {
return '#<a href="' return '#<a href="'
. System::baseUrl() . '/search?tag=' . rawurlencode($matches[1]) . System::baseUrl() . '/search?tag=' . rawurlencode($matches[1])
. '" class="tag" title="' . XML::escape($matches[1]) . '">' . '" class="tag" rel="tag" title="' . XML::escape($matches[1]) . '">'
. XML::escape($matches[1]) . XML::escape($matches[1])
. '</a>'; . '</a>';
}, $text); }, $text);