New function to replace blank characters
This commit is contained in:
parent
4dbb7dd3da
commit
9066a6133c
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue