You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ToUnicode never fails. If any step fails, then the original input
sequence is returned immediately in that step.
Unfortunately, this is not always the case with punycode.toUnicode:
> punycode.toUnicode('xn--http')
RangeError: Invalid input
at error (punycode.js:42:8)
at decode (punycode.js:235:5)
at punycode.js:389:6
at map (punycode.js:57:20)
at mapDomain (punycode.js:84:18)
at Object.toUnicode (punycode.js:387:9)
It would be great if punycode silently ignored exceptions and returned the given input.
The text was updated successfully, but these errors were encountered:
Hi there,
Thanks for developing and maintaining this package 🙇
Earlier today, I ran into a weird error when another script produced a malformed string which is not a punycode, but looks like one: "xn--http.com".
Per RFC 3490,
toUnicode
should never fail:Unfortunately, this is not always the case with
punycode.toUnicode
:It would be great if
punycode
silently ignored exceptions and returned the given input.The text was updated successfully, but these errors were encountered: