-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL punycode differs from nodejs / chrome behaviour #1223
Comments
Yes, I can confirm it. I can work on this issue only after some days, so if someone wanna work on it before - feel free. |
@zloirock It looks interesting, I can start looking into it, if you haven't already |
I don't know if it would be useful (as it is written in C++), but Node.js recently switched to ada for URL parsing, and this uses idna for converting between unicode and ascii. Maybe some inspiration could be taken from their utf32_to_punycode implementation, which seems relatively short and free of dependencies (though obviously JS doesn't start from UTF32). |
I'm trying to use pdfjs on the lower version of Chrome. There is a piece of code used to determine whether the worker src is of the same origin. When using the blob url as the worker src, it will be judged as false. Here is an example below.
https://stackblitz.com/edit/vitejs-vite-kekzvf?embed=1&file=url.js |
@iTsingchen could you create a separate issue? |
Consider the following url which has non-ascii characters:
https://𝚍𝚒𝚜𝚌𝚘𝚛𝚍.gg
While trying to parse this for the hostname, both nodejs and chrome return ascii string
discord.gg
but corejs returnsxn--ci2hbbs5ase.gg
Here is the code:
The text was updated successfully, but these errors were encountered: