]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8458-2: Now all unicode emojis should work
authorMichael <heluecht@pirati.ca>
Sun, 17 May 2020 21:46:54 +0000 (21:46 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 17 May 2020 21:46:54 +0000 (21:46 +0000)
src/Content/Text/BBCode.php

index 508a325ca1bb2516db9557b268a0dda07059b107..258f52523c6ceccef1f3bae47f2b2ec72a5048e6 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 (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 (strlen($conv) / mb_strlen($conv) == 4) {
+                               $text = '<span style="font-size: xx-large; line-height: initial;">' . $text . '</span>';
                        }
                }