diff options
author | Rajaram Gaunker <zimbabao@gmail.com> | 2017-05-11 00:19:15 -0700 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2017-05-20 00:36:57 -0700 |
commit | 06a617aa21c434b5e607370e7ee0051d506a4793 (patch) | |
tree | 512f0e7f3d7e5573675b93f7b4d322d7030f4c5b /test/parallel/test-url-domain-ascii-unicode.js | |
parent | 841bb4c61f07a5c2bf818a3b985ea0f88257210e (diff) | |
download | android-node-v8-06a617aa21c434b5e607370e7ee0051d506a4793.tar.gz android-node-v8-06a617aa21c434b5e607370e7ee0051d506a4793.tar.bz2 android-node-v8-06a617aa21c434b5e607370e7ee0051d506a4793.zip |
url: update IDNA error conditions
This commit contains three separate changes:
- Always return a string from ToUnicode no matter if an error occurred.
- Disable CheckHyphens boolean flag. This flag will soon be enabled in
the URL Standard, but is implemented manually by selectively ignoring
certain errors.
- Enable CheckBidi boolean flag per URL Standard update.
This allows domain names with hyphens at 3 and 4th position, as well as
those with leading and trailing hyphens. They are technically invalid,
but seen in the wild.
Tests are updated and simplified accordingly.
PR-URL: https://github.com/nodejs/node/pull/12966
Fixes: https://github.com/nodejs/node/issues/12965
Refs: https://github.com/whatwg/url/pull/309
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'test/parallel/test-url-domain-ascii-unicode.js')
-rw-r--r-- | test/parallel/test-url-domain-ascii-unicode.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-url-domain-ascii-unicode.js b/test/parallel/test-url-domain-ascii-unicode.js index dcc918201b..9c288cb6e2 100644 --- a/test/parallel/test-url-domain-ascii-unicode.js +++ b/test/parallel/test-url-domain-ascii-unicode.js @@ -8,7 +8,8 @@ const domainToASCII = url.domainToASCII; const domainToUnicode = url.domainToUnicode; const domainWithASCII = [ - ['ıídيٴ', 'xn--d-iga7ro0q9f'], + ['ıíd', 'xn--d-iga7r'], + ['يٴ', 'xn--mhb8f'], ['www.ϧƽəʐ.com', 'www.xn--cja62apfr6c.com'], ['новини.com', 'xn--b1amarcd.com'], ['名がドメイン.com', 'xn--v8jxj3d1dzdz08w.com'], |