-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Unhandled rejection URIError: URI malformed #22
Comments
It's coming from: https://github.com/sindresorhus/normalize-url/blob/48b1864f8ef197df46abc380f55ca6f831d52fed/index.js#L84 This seems relevant: https://stackoverflow.com/questions/9064536/javascript-decodeuricomponent-malformed-uri-exception This works, but I don't think that's a good solution: decodeURI(unescape('http://example.com/D%C9PLIANT')) |
Thank you for a nice library.
I would expect either no results if the url is indeed malformed |
- open issue upstream: sindresorhus/get-urls#22 - although this just reflects the browser API's behaviour: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Malformed_URI - ensure to catch any errors thrown from `normalize-url` calls - fallback to using the un-normalized URL if given URL has issues
This was fixed by d3d0f29 |
I found an url that make
get-urls
throw an errorTo reproduce the issue, parse this string with
get-urls
:%C9
is used to create an accent in french.The text was updated successfully, but these errors were encountered: