Show punycode if URL contains Latin dum character
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2018 17:03:55 +0000 (17:03 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2018 17:03:55 +0000 (17:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184477
<rdar://problem/39121999>

Reviewed by David Kilzer.

Source/WebCore:

Revise our "lookalike character" logic to include the small
Latin dum 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@230530 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 d8842c1..4afba50 100644 (file)
@@ -1,3 +1,14 @@
+2018-04-11  Brent Fulgham  <bfulgham@apple.com>
+
+        Show punycode if URL contains Latin dum character
+        https://bugs.webkit.org/show_bug.cgi?id=184477
+        <rdar://problem/39121999>
+
+        Reviewed by David Kilzer.
+
+        * fast/url/host-expected.txt:
+        * fast/url/host.html:
+
 2018-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [Extra zoom mode] Missing label when focusing a <select> with a title attribute but no associated <label>
index 3739272..8fc0c69 100644 (file)
@@ -47,6 +47,7 @@ PASS canonicalize('http://@google.com/') is 'http://google.com/'
 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 successfullyParsed is true
 
 TEST COMPLETE
index 251f3fd..b022b50 100644 (file)
@@ -87,7 +87,8 @@ cases = [
   ["@google.com","google.com"],
   ["quip\u2010apple.com", "xn--quipapple-y79d.com"],
   ["quip\u2011apple.com", "xn--quipapple-y79d.com"],
-  ["quip\u2212apple.com", "xn--quipapple-tf4e.com"]
+  ["quip\u2212apple.com", "xn--quipapple-tf4e.com"],
+  ["iclou\uA771.com", "xn--iclou-rl3s.com"]
 ];
 
 for (var i = 0; i < cases.length; ++i) {
index c67aeb0..f71ee61 100644 (file)
@@ -1,3 +1,19 @@
+2018-04-11  Brent Fulgham  <bfulgham@apple.com>
+
+        Show punycode if URL contains Latin dum character
+        https://bugs.webkit.org/show_bug.cgi?id=184477
+        <rdar://problem/39121999>
+
+        Reviewed by David Kilzer.
+
+        Revise our "lookalike character" logic to include the small
+        Latin dum character.
+
+        Test: fast/url/host.html
+
+        * platform/mac/WebCoreNSURLExtras.mm:
+        (WebCore::isLookalikeCharacter):
+
 2018-04-11  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [GTK] WaylandCompositorDisplay leaks its wl_display
index cc6c2fa..8c61ac1 100644 (file)
@@ -207,6 +207,7 @@ static BOOL isLookalikeCharacter(std::optional<UChar32> previousCodePoint, UChar
         case 0x33C6: /* SQUARE C OVER KG */
         case 0x33DF: /* SQUARE A OVER M */
         case 0xA731: /* LATIN LETTER SMALL CAPITAL S */
+        case 0xA771: /* LATIN SMALL LETTER DUM */
         case 0xA789: /* MODIFIER LETTER COLON */
         case 0xFE14: /* PRESENTATION FORM FOR VERTICAL SEMICOLON */
         case 0xFE15: /* PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK */