jsdom / tr46

An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing.
MIT License
32 stars 14 forks source link

Fix empty label handling #39

Closed domenic closed 1 year ago

domenic commented 1 year ago

As discovered in https://github.com/jsdom/whatwg-url/pull/250, the library currently does not handle empty labels in the same way that browsers seem to do. Although the standard is unclear, we should align to browser handling.

To test this, we pull in the new IdnaTestV2.json file from WPT. This is somewhat redundant with our existing IdnaTestV2.txt, but it also represents a significant curation effort to ensure we only have URL-applicable tests, so we should make use of that.

This won't pass until https://github.com/web-platform-tests/wpt/pull/38813 is merged and we update the test commit SHA.