]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Smilies.php
New function to replace blank characters
[friendica.git] / src / Content / Smilies.php
index 6d07de575c3973d7421d817d5aab0ef12837867a..add6281ec3a14b7650351881efddbcac328bf8e8 100644 (file)
@@ -294,7 +294,7 @@ class Smilies
         */
        public static function isEmojiPost(string $body): bool
        {
-               $conv = html_entity_decode(str_replace([' ', "\n", "\r"], '', $body));
+               $conv = html_entity_decode(preg_replace('#\s#', '', $body));
                // Emojis are always 4 byte Unicode characters
                return (!empty($conv) && (strlen($conv) / mb_strlen($conv) == 4));
        }