valid-url icon indicating copy to clipboard operation
valid-url copied to clipboard

validates https://https://www.facebook.com/sunnybens as valid

Open ekumahost opened this issue 4 years ago • 1 comments

https://https://www.facebook.com/sunnybens

this thing above cannot be a valid url but its accepted

ekumahost avatar May 12 '20 19:05 ekumahost

Hi @ekumahost,

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.

adrienv1520 avatar Oct 17 '20 16:10 adrienv1520