]> git.mxchange.org Git - friendica.git/commitdiff
Prevent image descriptions from being replaced by local smilies
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 15 Nov 2020 05:12:26 +0000 (00:12 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 15 Nov 2020 05:12:26 +0000 (00:12 -0500)
- AP-received emojis have their code in the image description

src/Content/Text/BBCode.php

index b1cfff0a426304b8c725a63a2f8bfbcc642ed3ff..edd73ce108e75789b07b159b2b69d20ac926037e 100644 (file)
@@ -1699,7 +1699,9 @@ class BBCode
 
                                // Replace non graphical smilies for external posts
                                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)) {