Closed redlpd closed 3 years ago
Tried using punnycode.toASCII like this: punycode.toASCII('https://sample.com');
punycode.toASCII('https://sample.com');
Actual result: xn--https://ggl-ykj0ia.com
xn--https://ggl-ykj0ia.com
Expected result: https://xn--ggl-ykj0ia.com
https://xn--ggl-ykj0ia.com
Same issue here
Yeah, you’re supposed to only pass it the domain name, not a full URL including a schema like http:// or https://. See the docs: https://github.com/bestiejs/punycode.js#punycodetoasciiinput
http://
https://
Tried using punnycode.toASCII like this:
punycode.toASCII('https://sample.com');
Actual result:
xn--https://ggl-ykj0ia.com
Expected result:
https://xn--ggl-ykj0ia.com