valid-url
valid-url copied to clipboard
Wrong processing of URL
try to verify that url: http://wrong%20link.tech/JFKblue.gif
if (validUrl.isWebUri(http://wrong%20link.tech/JFKblue.gif)){ console.log('Looks like an URI');
in logs I see that it looks like an URI, but it's not.
Hi @EJohnF,
Sure this URL is wrong.
I was facing the same issues with valid-url
but also validator
so I decided to build a module as reliable as possible strictly based on RFC-3986: https://github.com/adrienv1520/node-uri
The main features of this project are:
- parse any URI (URNs, URLs, URIs with IDNs support, etc.);
- get the safe Punycode ASCII or Unicode serialization of a domain;
- check an URI, HTTP/HTTPS/Sitemap URL, IP, domain is valid with clear checking errors;
- encode/decode an URI, HTTP/HTTPS/Sitemap URL.
I hope it could help you.