Changeset 239967 in webkit


Ignore:
Timestamp:
Jan 14, 2019 6:14:16 PM (5 years ago)
Author:
achristensen@apple.com
Message:

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:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r239966 r239967  
     12019-01-14  Alex Christensen  <achristensen@webkit.org>
     2
     3        Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
     4        https://bugs.webkit.org/show_bug.cgi?id=193411
     5        <rdar://problem/47215929>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        * fast/url/user-visible/cyrillic-NFD-expected.txt:
     10        * fast/url/user-visible/cyrillic-NFD.html:
     11
    1122019-01-14  John Wilander  <wilander@apple.com>
    213
  • trunk/LayoutTests/fast/url/user-visible/cyrillic-NFD-expected.txt

    r189356 r239967  
    66PASS test('http://спецодежда.онлайн/') is 'http://спецодежда.онлайн/'
    77PASS test('http://спецодежда.онлайн/') is 'http://спецодежда.онлайн/'
     8PASS test('http://ж1-2.бг/') is 'http://ж1-2.бг/'
     9PASS test('http://жabc.бг/') is 'http://xn--abc-udd.xn--90ae/'
     10PASS test('http://abc.бг/') is 'http://abc.xn--90ae/'
     11PASS test('http://ы.бг/') is 'http://xn--01a.xn--90ae/'
     12PASS test('http://э.бг/') is 'http://xn--21a.xn--90ae/'
    813PASS successfullyParsed is true
    914
  • trunk/LayoutTests/fast/url/user-visible/cyrillic-NFD.html

    r189356 r239967  
    1818shouldBe("test('http://спецодежда.онла\u0439н/')", "'http://спецодежда.онлайн/'");
    1919shouldBe("test('http://спецодежда.онла\u0438\u0306н/')", "'http://спецодежда.онлайн/'");
     20shouldBe("test('http://ж1-2.бг/')", "'http://ж1-2.бг/'");
     21shouldBe("test('http://жabc.бг/')", "'http://xn--abc-udd.xn--90ae/'");
     22shouldBe("test('http://abc.бг/')", "'http://abc.xn--90ae/'");
     23shouldBe("test('http://ы.бг/')", "'http://xn--01a.xn--90ae/'");
     24shouldBe("test('http://э.бг/')", "'http://xn--21a.xn--90ae/'");
    2025
    2126</script>
  • trunk/Source/WTF/ChangeLog

    r239904 r239967  
     12019-01-14  Alex Christensen  <achristensen@webkit.org>
     2
     3        Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
     4        https://bugs.webkit.org/show_bug.cgi?id=193411
     5        <rdar://problem/47215929>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        * wtf/cocoa/NSURLExtras.mm:
     10        (WTF::allCharactersAllowedByTLDRules):
     11
    1122019-01-12  Timothy Hatcher  <timothy@apple.com>
    213
  • trunk/Source/WTF/wtf/cocoa/NSURLExtras.mm

    r239586 r239967  
    541541    });
    542542
     543    // https://www.icann.org/sites/default/files/packages/lgr/lgr-second-level-bulgarian-30aug16-en.html
     544    static const UChar cyrillicBG[] = {
     545        '.',
     546        0x0431, // CYRILLIC SMALL LETTER BE
     547        0x0433 // CYRILLIC SMALL LETTER GHE
     548    };
     549    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicBG, [](UChar ch) {
     550        return (ch >= 0x0430 && ch <= 0x044A) || ch == 0x044C || (ch >= 0x044E && ch <= 0x0450) || ch == 0x045D || isASCIIDigit(ch) || ch == '-';
     551    });
     552
    543553    // Not a known top level domain with special rules.
    544554    return NO;
Note: See TracChangeset for help on using the changeset viewer.