Show punycode if URL contains Latin small letter dotless i
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Dec 2018 16:20:03 +0000 (16:20 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Dec 2018 16:20:03 +0000 (16:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192944
<rdar://problem/46103047>

Reviewed by Andy Estes.

Source/WTF:

Revise our "lookalike character" logic to include the small Latin
dotless i character.

Test: fast/url/host.html

* wtf/cocoa/NSURLExtras.mm:
(WTF::isLookalikeCharacter):

LayoutTests:

* fast/url/host-expected.txt:
* fast/url/host.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239503 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/url/host-expected.txt
LayoutTests/fast/url/host.html
Source/WTF/ChangeLog
Source/WTF/wtf/cocoa/NSURLExtras.mm

index 8e7576c..cb4007d 100644 (file)
@@ -1,3 +1,14 @@
+2018-12-20  Brent Fulgham  <bfulgham@apple.com>
+
+        Show punycode if URL contains Latin small letter dotless i
+        https://bugs.webkit.org/show_bug.cgi?id=192944
+        <rdar://problem/46103047>
+
+        Reviewed by Andy Estes.
+
+        * fast/url/host-expected.txt:
+        * fast/url/host.html:
+
 2018-12-21  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed GTK+ gardening. Remove platform specific files that are exactly the same as the generic expectation.
index 154588e..85220c7 100644 (file)
@@ -49,6 +49,8 @@ PASS canonicalize('http://quip‑apple.com/') is 'http://xn--quipapple-y79d.com/
 PASS canonicalize('http://quip−apple.com/') is 'http://xn--quipapple-tf4e.com/'
 PASS canonicalize('http://iclouꝱ.com/') is 'http://xn--iclou-rl3s.com/'
 PASS canonicalize('http://gọọgle.com/') is 'http://xn--ggle-gx5aa.com/'
+PASS canonicalize('http://ıcloud.com/') is 'http://xn--cloud-m4a.com/'
+PASS canonicalize('http://twıtter.com/') is 'http://xn--twtter-q9a.com/'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index bb81371..eb29283 100644 (file)
@@ -89,7 +89,9 @@ cases = [
   ["quip\u2011apple.com", "xn--quipapple-y79d.com"],
   ["quip\u2212apple.com", "xn--quipapple-tf4e.com"],
   ["iclou\uA771.com", "xn--iclou-rl3s.com"],
-  ["g\u1ECD\u1ECDgle.com", "xn--ggle-gx5aa.com"]
+  ["g\u1ECD\u1ECDgle.com", "xn--ggle-gx5aa.com"],
+  ["\u0131cloud.com", "xn--cloud-m4a.com"],
+  ["tw\u0131tter.com", "xn--twtter-q9a.com"]
 ];
 
 for (var i = 0; i < cases.length; ++i) {
index 1046e44..d6ba904 100644 (file)
@@ -1,3 +1,19 @@
+2018-12-20  Brent Fulgham  <bfulgham@apple.com>
+
+        Show punycode if URL contains Latin small letter dotless i
+        https://bugs.webkit.org/show_bug.cgi?id=192944
+        <rdar://problem/46103047>
+
+        Reviewed by Andy Estes.
+
+        Revise our "lookalike character" logic to include the small Latin
+        dotless i character.
+
+        Test: fast/url/host.html
+
+        * wtf/cocoa/NSURLExtras.mm:
+        (WTF::isLookalikeCharacter):
+
 2018-12-20  Chris Dumez  <cdumez@apple.com>
 
         Use Optional::hasValue() instead of Optional::has_value()
index d57b995..3fe9459 100644 (file)
@@ -115,6 +115,7 @@ static BOOL isLookalikeCharacter(Optional<UChar32> previousCodePoint, UChar32 ch
         case 0x00BD: /* VULGAR FRACTION ONE HALF */
         case 0x00BE: /* VULGAR FRACTION THREE QUARTERS */
         case 0x00ED: /* LATIN SMALL LETTER I WITH ACUTE */
+        case 0x0131: /* LATIN SMALL LETTER DOTLESS I */
         case 0x01C3: /* LATIN LETTER RETROFLEX CLICK */
         case 0x0251: /* LATIN SMALL LETTER ALPHA */
         case 0x0261: /* LATIN SMALL LETTER SCRIPT G */