Show punycode if URL contains Latin small letter o with dot below character
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2018 22:50:55 +0000 (22:50 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2018 22:50:55 +0000 (22:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185051
<rdar://problem/39459297>

Reviewed by David Kilzer.

Source/WebCore:

Revise our "lookalike character" logic to include the small Latin o
with dot below character.

Test: fast/url/host.html

* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isLookalikeCharacter):

LayoutTests:

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

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

LayoutTests/ChangeLog
LayoutTests/fast/url/host-expected.txt
LayoutTests/fast/url/host.html
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/WebCoreNSURLExtras.mm

index 30bd77e..d2d768b 100644 (file)
@@ -1,3 +1,14 @@
+2018-04-26  Brent Fulgham  <bfulgham@apple.com>
+
+        Show punycode if URL contains Latin small letter o with dot below character
+        https://bugs.webkit.org/show_bug.cgi?id=185051
+        <rdar://problem/39459297>
+
+        Reviewed by David Kilzer.
+
+        * fast/url/host-expected.txt:
+        * fast/url/host.html:
+
 2018-04-26  Sihui Liu  <sihui_liu@apple.com>
 
         [iOS] LayoutTest http/tests/quicklook/hide-referer-on-navigation.html is failing
index 8fc0c69..154588e 100644 (file)
@@ -48,6 +48,7 @@ PASS canonicalize('http://quip‐apple.com/') is 'http://xn--quipapple-y79d.com/
 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 successfullyParsed is true
 
 TEST COMPLETE
index b022b50..bb81371 100644 (file)
@@ -88,7 +88,8 @@ cases = [
   ["quip\u2010apple.com", "xn--quipapple-y79d.com"],
   ["quip\u2011apple.com", "xn--quipapple-y79d.com"],
   ["quip\u2212apple.com", "xn--quipapple-tf4e.com"],
-  ["iclou\uA771.com", "xn--iclou-rl3s.com"]
+  ["iclou\uA771.com", "xn--iclou-rl3s.com"],
+  ["g\u1ECD\u1ECDgle.com", "xn--ggle-gx5aa.com"]
 ];
 
 for (var i = 0; i < cases.length; ++i) {
index 3e2f3fc..55f21ac 100644 (file)
@@ -1,3 +1,19 @@
+2018-04-26  Brent Fulgham  <bfulgham@apple.com>
+
+        Show punycode if URL contains Latin small letter o with dot below character
+        https://bugs.webkit.org/show_bug.cgi?id=185051
+        <rdar://problem/39459297>
+
+        Reviewed by David Kilzer.
+
+        Revise our "lookalike character" logic to include the small Latin o
+        with dot below character.
+
+        Test: fast/url/host.html
+
+        * platform/mac/WebCoreNSURLExtras.mm:
+        (WebCore::isLookalikeCharacter):
+
 2018-04-26  Daniel Bates  <dabates@apple.com>
 
         Fix the build following r231068
index b94b72a..c97deca 100644 (file)
@@ -147,6 +147,7 @@ static BOOL isLookalikeCharacter(std::optional<UChar32> previousCodePoint, UChar
         case 0x1D20: /* LATIN LETTER SMALL CAPITAL V */
         case 0x1D21: /* LATIN LETTER SMALL CAPITAL W */
         case 0x1D22: /* LATIN LETTER SMALL CAPITAL Z */
+        case 0x1ECD: /* LATIN SMALL LETTER O WITH DOT BELOW */
         case 0x2010: /* HYPHEN */
         case 0x2011: /* NON-BREAKING HYPHEN */
         case 0x2024: /* ONE DOT LEADER */