Exclude [attachment] from tag search

This commit is contained in:
Hypolite Petovan 2022-12-16 20:06:37 -05:00
parent f37750d679
commit d609d70bd2

View file

@ -2355,7 +2355,7 @@ class BBCode
DI::profiler()->startRecording('rendering');
$ret = [];
self::performWithEscapedTags($string, ['noparse', 'pre', 'code', 'img'], function ($string) use (&$ret) {
self::performWithEscapedTags($string, ['noparse', 'pre', 'code', 'img', 'attachment'], function ($string) use (&$ret) {
// Convert hashtag links to hashtags
$string = preg_replace('/#\[url\=([^\[\]]*)\](.*?)\[\/url\]/ism', '#$2 ', $string);