Merge pull request #9534 from MrPetovan/bug/smilies-image-description

Prevent image descriptions from being replaced by local smilies
This commit is contained in:
Michael Vogel 2020-11-15 07:21:27 +01:00 committed by GitHub
commit 64ce43cdef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1699,7 +1699,9 @@ class BBCode
// Replace non graphical smilies for external posts // Replace non graphical smilies for external posts
if (!$nosmile && !$for_plaintext) { if (!$nosmile && !$for_plaintext) {
$text = Smilies::replace($text); $text = self::performWithEscapedTags($text, ['img'], function ($text) {
return Smilies::replace($text);
});
} }
if (!$for_plaintext && DI::config()->get('system', 'big_emojis') && ($simple_html != self::DIASPORA)) { if (!$for_plaintext && DI::config()->get('system', 'big_emojis') && ($simple_html != self::DIASPORA)) {