Emoji: Only accept RGI emoji.

"recommended for general interchange"
This commit is contained in:
lain 2020-12-02 16:46:19 +01:00
commit 8fb259e739
2 changed files with 9 additions and 2 deletions

View file

@ -11,7 +11,11 @@ defmodule Pleroma.EmojiTest do
refute Emoji.is_unicode_emoji?("X")
refute Emoji.is_unicode_emoji?("")
assert Emoji.is_unicode_emoji?("")
# Only accept fully-qualified (RGI) emoji
# See http://www.unicode.org/reports/tr51/
refute Emoji.is_unicode_emoji?("")
refute Emoji.is_unicode_emoji?("")
assert Emoji.is_unicode_emoji?("🥺")
assert Emoji.is_unicode_emoji?("🤰")
assert Emoji.is_unicode_emoji?("❤️")