summaryrefslogtreecommitdiff
blob: f6f98497ba09bebf2fbefab04c16e11420695e23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 020c458932087a7da9b514563c3926be5a406d55 Mon Sep 17 00:00:00 2001
From: Jungshik Shin <jshin@chromium.org>
Date: Mon, 4 Dec 2017 09:42:01 -0500
Subject: [PATCH] Disallow 5 aspirational scripts in IDN display

UTS 31 (http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts )
used to list 5 scripts in Table 6 as 'aspirational scripts', but it
deprecated the category and moved 5 scripts to Table 7 for limited use
scripts.

Given this, there's no basis to treat those 5 scripts differently from
other limited use scripts. Note that Mozilla stopped allowding those 5
scripts in IDN display a while ago.

This is also necessary for updating ICU to version 60.
---
 components/url_formatter/url_formatter.cc | 33 -------------------------------
 1 file changed, 33 deletions(-)

diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
index a93bf1154c..6b000c3480 100644
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
@@ -426,39 +426,6 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
   const icu::UnicodeSet* inclusion_set = uspoof_getInclusionUnicodeSet(status);
   allowed_set.addAll(*inclusion_set);
 
-  // Five aspirational scripts are taken from UTR 31 Table 6 at
-  // http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts .
-  // Not all the characters of aspirational scripts are suitable for
-  // identifiers. Therefore, only characters belonging to
-  // [:Identifier_Type=Aspirational:] (listed in 'Status/Type=Aspirational'
-  // section at
-  // http://www.unicode.org/Public/security/latest/xidmodifications.txt) are
-  // are added to the allowed set. The list has to be updated when a new
-  // version of Unicode is released. The current version is 9.0.0 and ICU 60
-  // will have Unicode 10.0 data.
-#if U_ICU_VERSION_MAJOR_NUM < 60
-  const icu::UnicodeSet aspirational_scripts(
-      icu::UnicodeString(
-          // Unified Canadian Syllabics
-          "[\\u1401-\\u166C\\u166F-\\u167F"
-          // Mongolian
-          "\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA"
-          // Unified Canadian Syllabics
-          "\\u18B0-\\u18F5"
-          // Tifinagh
-          "\\u2D30-\\u2D67\\u2D7F"
-          // Yi
-          "\\uA000-\\uA48C"
-          // Miao
-          "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E"
-          "\\U00016F8F-\\U00016F9F]",
-          -1, US_INV),
-      *status);
-  allowed_set.addAll(aspirational_scripts);
-#else
-#error "Update aspirational_scripts per Unicode 10.0"
-#endif
-
   // 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).
-- 
2.14.3