From: Hypolite Petovan Date: Wed, 30 Aug 2023 02:17:48 +0000 (-0400) Subject: Add FIXME X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=64b5f93a6a161e58a7677f92ef92c421ac750ad8;p=friendica.git Add FIXME - Current implementation is failing tests with emojis including the zero-width-joiner character, encoded on 3 bytes only. --- diff --git a/src/Content/Smilies.php b/src/Content/Smilies.php index 664a4089ce..8744e19995 100644 --- a/src/Content/Smilies.php +++ b/src/Content/Smilies.php @@ -296,7 +296,7 @@ class Smilies { // Strips all whitespace $conv = preg_replace('#\s#u', '', html_entity_decode($body)); - // Emojis are always 4 byte Unicode characters + // @FIXME Emojis are almost always 4 byte Unicode characters, except when they include the zero-width joiner character, encoded on 3 bytes return (!empty($conv) && (strlen($conv) / mb_strlen($conv) == 4)); } }