Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1078)

Unified Diff: components/url_formatter/url_formatter.cc

Issue 2865213002: Remove a small range of Tibetan characters from the allowed IDN set on Mac. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/url_formatter/url_formatter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/url_formatter/url_formatter.cc
diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
index d54b67913ce76d400907266963475bae6920cdd9..61fa25af02845f036914814ded853375d773fecc 100644
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
@@ -523,6 +523,17 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
allowed_set.remove(0x2010u); // Hyphen
allowed_set.remove(0x2027u); // Hyphenation Point
+#if defined(OS_MACOSX)
+ // The following characters are reported as present in the default macOS
+ // system UI font, but they render as blank. Remove them from the allowed
+ // set to prevent spoofing.
+ // Tibetan characters used for transliteration of ancient texts:
+ allowed_set.remove(0x0F8Cu);
+ allowed_set.remove(0x0F8Du);
+ allowed_set.remove(0x0F8Eu);
+ allowed_set.remove(0x0F8Fu);
+#endif
+
uspoof_setAllowedUnicodeSet(checker_, &allowed_set, status);
}
« no previous file with comments | « no previous file | components/url_formatter/url_formatter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698