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.
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: http://svn.webkit.org/repository/webkit/trunk@231078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 30bd77e..d2d768b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -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
diff --git a/LayoutTests/fast/url/host-expected.txt b/LayoutTests/fast/url/host-expected.txt
index 8fc0c69..154588e 100644
--- a/LayoutTests/fast/url/host-expected.txt
+++ b/LayoutTests/fast/url/host-expected.txt
@@ -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-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
diff --git a/LayoutTests/fast/url/host.html b/LayoutTests/fast/url/host.html
index b022b50..bb81371 100644
--- a/LayoutTests/fast/url/host.html
+++ b/LayoutTests/fast/url/host.html
@@ -88,7 +88,8 @@
["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) {
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 3e2f3fc..55f21ac 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -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
diff --git a/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm b/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
index b94b72a..c97deca 100644
--- a/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
+++ b/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
@@ -147,6 +147,7 @@
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 */