diff options
author | Rajaram Gaunker <zimbabao@gmail.com> | 2017-05-11 10:19:15 +0300 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2017-05-20 10:36:57 +0300 |
commit | 06a617aa21c434b5e607370e7ee0051d506a4793 (patch) | |
tree | 512f0e7f3d7e5573675b93f7b4d322d7030f4c5b /src/node_i18n.h | |
parent | 841bb4c61f07a5c2bf818a3b985ea0f88257210e (diff) |
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 'src/node_i18n.h')
-rw-r--r-- | src/node_i18n.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node_i18n.h b/src/node_i18n.h index 78e18fdb370..cc1f3e6ea53 100644 --- a/src/node_i18n.h +++ b/src/node_i18n.h @@ -43,8 +43,7 @@ int32_t ToASCII(MaybeStackBuffer<char>* buf, bool lenient = false); int32_t ToUnicode(MaybeStackBuffer<char>* buf, const char* input, - size_t length, - bool lenient = false); + size_t length); } // namespace i18n } // namespace node |