Commit b9f51ee9 authored by Jungshik Shin's avatar Jungshik Shin Committed by Commit Bot

Block U+0620 on Mac from being shown in Unicode in IDN

Mac OS UI fonts renders U+0620 as blank. (radar/32458012)

Bug: chromium:725660
Test: components_unittests --gtest_filter=*IDNToUni*
Change-Id: Ib7d678aae0379e8ac53064663660a7840e5fd3bd
Reviewed-on: https://chromium-review.googlesource.com/517669
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475842}
parent eed4be16
...@@ -380,7 +380,11 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) { ...@@ -380,7 +380,11 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// The following characters are reported as present in the default macOS // The following characters are reported as present in the default macOS
// system UI font, but they render as blank. Remove them from the allowed // system UI font, but they render as blank. Remove them from the allowed
// set to prevent spoofing. // set to prevent spoofing until the font issue is resolved.
// Arabic letter KASHMIRI YEH. Not used in Arabic and Persian.
allowed_set.remove(0x0620u);
// Tibetan characters used for transliteration of ancient texts: // Tibetan characters used for transliteration of ancient texts:
allowed_set.remove(0x0F8Cu); allowed_set.remove(0x0F8Cu);
allowed_set.remove(0x0F8Du); allowed_set.remove(0x0F8Du);
......
...@@ -414,8 +414,11 @@ const IDNTestCase idn_cases[] = { ...@@ -414,8 +414,11 @@ const IDNTestCase idn_cases[] = {
// Hebrew Gershayim with Arabic is disallowed. // Hebrew Gershayim with Arabic is disallowed.
{"xn--5eb7h.eg", L"\x0628\x05f4.eg", false}, {"xn--5eb7h.eg", L"\x0628\x05f4.eg", false},
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// Tibetan transliteration characters are disallowed on Mac. // These characters are blocked due to a font issue on Mac.
// Tibetan transliteration characters.
{"xn--com-luma.test.pl", L"\u0f8c.test.pl", false}, {"xn--com-luma.test.pl", L"\u0f8c.test.pl", false},
// Arabic letter KASHMIRI YEH
{"xn--fgb.com", L"\u0620.com", false},
#endif #endif
// Hyphens (http://unicode.org/cldr/utility/confusables.jsp?a=-) // Hyphens (http://unicode.org/cldr/utility/confusables.jsp?a=-)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment