Prevent hashtag parsing and replacement in image alternative text

2022.09-rc
Hypolite Petovan 2021-01-22 17:45:28 -05:00
rodzic 615e6f20f0
commit e2c38f1347
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

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

Wyświetl plik

@ -1866,7 +1866,7 @@ class Item
public static function setHashtags($body)
{
$body = BBCode::performWithEscapedTags($body, ['noparse', 'pre', 'code'], function ($body) {
$body = BBCode::performWithEscapedTags($body, ['noparse', 'pre', 'code', 'img'], function ($body) {
$tags = BBCode::getTags($body);
// No hashtags?