Title: [241153] branches/safari-607-branch
Revision
241153
Author
[email protected]
Date
2019-02-07 15:36:25 -0800 (Thu, 07 Feb 2019)

Log Message

Cherry-pick r239967. rdar://problem/47776476

    Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
    https://bugs.webkit.org/show_bug.cgi?id=193411
    <rdar://problem/47215929>

    Reviewed by Alexey Proskuryakov.

    Source/WTF:

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

    LayoutTests:

    * fast/url/user-visible/cyrillic-NFD-expected.txt:
    * fast/url/user-visible/cyrillic-NFD.html:

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

Modified Paths

Diff

Modified: branches/safari-607-branch/LayoutTests/ChangeLog (241152 => 241153)


--- branches/safari-607-branch/LayoutTests/ChangeLog	2019-02-07 23:36:22 UTC (rev 241152)
+++ branches/safari-607-branch/LayoutTests/ChangeLog	2019-02-07 23:36:25 UTC (rev 241153)
@@ -1,3 +1,38 @@
+2019-02-07  Alan Coon  <[email protected]>
+
+        Cherry-pick r239967. rdar://problem/47776476
+
+    Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
+    https://bugs.webkit.org/show_bug.cgi?id=193411
+    <rdar://problem/47215929>
+    
+    Reviewed by Alexey Proskuryakov.
+    
+    Source/WTF:
+    
+    * wtf/cocoa/NSURLExtras.mm:
+    (WTF::allCharactersAllowedByTLDRules):
+    
+    LayoutTests:
+    
+    * fast/url/user-visible/cyrillic-NFD-expected.txt:
+    * fast/url/user-visible/cyrillic-NFD.html:
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-14  Alex Christensen  <[email protected]>
+
+            Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
+            https://bugs.webkit.org/show_bug.cgi?id=193411
+            <rdar://problem/47215929>
+
+            Reviewed by Alexey Proskuryakov.
+
+            * fast/url/user-visible/cyrillic-NFD-expected.txt:
+            * fast/url/user-visible/cyrillic-NFD.html:
+
 2019-02-06  Alan Coon  <[email protected]>
 
         Cherry-pick r241031. rdar://problem/47866495

Modified: branches/safari-607-branch/LayoutTests/fast/url/user-visible/cyrillic-NFD-expected.txt (241152 => 241153)


--- branches/safari-607-branch/LayoutTests/fast/url/user-visible/cyrillic-NFD-expected.txt	2019-02-07 23:36:22 UTC (rev 241152)
+++ branches/safari-607-branch/LayoutTests/fast/url/user-visible/cyrillic-NFD-expected.txt	2019-02-07 23:36:25 UTC (rev 241153)
@@ -5,6 +5,11 @@
 
 PASS test('http://спецодежда.онлайн/') is 'http://спецодежда.онлайн/'
 PASS test('http://спецодежда.онлайн/') is 'http://спецодежда.онлайн/'
+PASS test('http://ж1-2.бг/') is 'http://ж1-2.бг/'
+PASS test('http://жabc.бг/') is 'http://xn--abc-udd.xn--90ae/'
+PASS test('http://abc.бг/') is 'http://abc.xn--90ae/'
+PASS test('http://ы.бг/') is 'http://xn--01a.xn--90ae/'
+PASS test('http://э.бг/') is 'http://xn--21a.xn--90ae/'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-607-branch/LayoutTests/fast/url/user-visible/cyrillic-NFD.html (241152 => 241153)


--- branches/safari-607-branch/LayoutTests/fast/url/user-visible/cyrillic-NFD.html	2019-02-07 23:36:22 UTC (rev 241152)
+++ branches/safari-607-branch/LayoutTests/fast/url/user-visible/cyrillic-NFD.html	2019-02-07 23:36:25 UTC (rev 241153)
@@ -17,6 +17,11 @@
 
 shouldBe("test('http://спецодежда.онла\u0439н/')", "'http://спецодежда.онлайн/'");
 shouldBe("test('http://спецодежда.онла\u0438\u0306н/')", "'http://спецодежда.онлайн/'");
+shouldBe("test('http://ж1-2.бг/')", "'http://ж1-2.бг/'");
+shouldBe("test('http://жabc.бг/')", "'http://xn--abc-udd.xn--90ae/'");
+shouldBe("test('http://abc.бг/')", "'http://abc.xn--90ae/'");
+shouldBe("test('http://ы.бг/')", "'http://xn--01a.xn--90ae/'");
+shouldBe("test('http://э.бг/')", "'http://xn--21a.xn--90ae/'");
 
 </script>
 <script src=""

Modified: branches/safari-607-branch/Source/WTF/ChangeLog (241152 => 241153)


--- branches/safari-607-branch/Source/WTF/ChangeLog	2019-02-07 23:36:22 UTC (rev 241152)
+++ branches/safari-607-branch/Source/WTF/ChangeLog	2019-02-07 23:36:25 UTC (rev 241153)
@@ -1,3 +1,38 @@
+2019-02-07  Alan Coon  <[email protected]>
+
+        Cherry-pick r239967. rdar://problem/47776476
+
+    Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
+    https://bugs.webkit.org/show_bug.cgi?id=193411
+    <rdar://problem/47215929>
+    
+    Reviewed by Alexey Proskuryakov.
+    
+    Source/WTF:
+    
+    * wtf/cocoa/NSURLExtras.mm:
+    (WTF::allCharactersAllowedByTLDRules):
+    
+    LayoutTests:
+    
+    * fast/url/user-visible/cyrillic-NFD-expected.txt:
+    * fast/url/user-visible/cyrillic-NFD.html:
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-14  Alex Christensen  <[email protected]>
+
+            Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
+            https://bugs.webkit.org/show_bug.cgi?id=193411
+            <rdar://problem/47215929>
+
+            Reviewed by Alexey Proskuryakov.
+
+            * wtf/cocoa/NSURLExtras.mm:
+            (WTF::allCharactersAllowedByTLDRules):
+
 2019-01-30  Babak Shafiei  <[email protected]>
 
         Cherry-pick r240633. rdar://problem/47682687

Modified: branches/safari-607-branch/Source/WTF/wtf/cocoa/NSURLExtras.mm (241152 => 241153)


--- branches/safari-607-branch/Source/WTF/wtf/cocoa/NSURLExtras.mm	2019-02-07 23:36:22 UTC (rev 241152)
+++ branches/safari-607-branch/Source/WTF/wtf/cocoa/NSURLExtras.mm	2019-02-07 23:36:25 UTC (rev 241153)
@@ -540,6 +540,16 @@
         return (ch >= 0x0430 && ch <= 0x044f) || ch == 0x0451 || ch == 0x04E9 || ch == 0x04AF || isASCIIDigit(ch) || ch == '-';
     });
 
+    // https://www.icann.org/sites/default/files/packages/lgr/lgr-second-level-bulgarian-30aug16-en.html
+    static const UChar cyrillicBG[] = {
+        '.',
+        0x0431, // CYRILLIC SMALL LETTER BE
+        0x0433 // CYRILLIC SMALL LETTER GHE
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicBG, [](UChar ch) {
+        return (ch >= 0x0430 && ch <= 0x044A) || ch == 0x044C || (ch >= 0x044E && ch <= 0x0450) || ch == 0x045D || isASCIIDigit(ch) || ch == '-';
+    });
+
     // Not a known top level domain with special rules.
     return NO;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to