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

Unified Diff: components/url_formatter/url_formatter.cc

Issue 2613603002: url_formatter: Remove U+2010 from the displayable character set. (Closed)
Patch Set: Created 3 years, 12 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 43b53412202bea9b87c8d46a6dccd4a85ceb626d..a93bf1154c333fbd7b268855f60a3eac3b250353 100644
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
@@ -462,6 +462,8 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
// U+0338 is included in the recommended set, while U+05F4 and U+2027 are in
// the inclusion set. However, they are blacklisted as a part of Mozilla's
// IDN blacklist (http://kb.mozillazine.org/Network.IDN.blacklist_chars).
+ // U+2010 is in the inclusion set, but we drop it because it can be confused
+ // with an ASCII U+002D (Hyphen-Minus).
// U+0338 and U+2027 are dropped; the former can look like a slash when
// rendered with a broken font, and the latter can be confused with U+30FB
// (Katakana Middle Dot). U+05F4 (Hebrew Punctuation Gershayim) is kept,
@@ -469,6 +471,7 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
// should be safe. When used with a non-Hebrew script, it'd be filtered by
// other checks in place.
allowed_set.remove(0x338u); // Combining Long Solidus Overlay
+ allowed_set.remove(0x2010u); // Hyphen
allowed_set.remove(0x2027u); // Hyphenation Point
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