]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/BBCode.php
Merge pull request #8657 from MrPetovan/bug/8653-catch-template-engine-errors
[friendica.git] / src / Content / Text / BBCode.php
index 508a325ca1bb2516db9557b268a0dda07059b107..67dbe3b19aa05a3e347f0d9cb6c170a5e4e46425 100644 (file)
@@ -1724,14 +1724,14 @@ class BBCode
 
                // Replace non graphical smilies for external posts
                if (!$nosmile && !$for_plaintext) {
-                       $oldtext = $text;
                        $text = Smilies::replace($text);                        
-                       if (DI::config()->get('system', 'big_emojis') && ($simple_html != self::DIASPORA) && ($oldtext != $text)) {
-                               $conv = html_entity_decode(str_replace([' ', "\n", "\r"], '', $text));
-                               // Emojis are always 4 byte Unicode characters
-                               if (strlen($conv) / mb_strlen($conv) == 4) {
-                                       $text = '<span style="font-size: xx-large; line-height: initial;">' . $text . '</span>';
-                               }
+               }
+
+               if (!$for_plaintext && DI::config()->get('system', 'big_emojis') && ($simple_html != self::DIASPORA)) {
+                       $conv = html_entity_decode(str_replace([' ', "\n", "\r"], '', $text));
+                       // Emojis are always 4 byte Unicode characters
+                       if (!empty($conv) && (strlen($conv) / mb_strlen($conv) == 4)) {
+                               $text = '<span style="font-size: xx-large; line-height: initial;">' . $text . '</span>';
                        }
                }