Skip to content
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

Version 13.6.0 and 13.7.0 are not compatible #1866

Closed
unicornonea opened this issue Nov 11, 2021 · 3 comments
Closed

Version 13.6.0 and 13.7.0 are not compatible #1866

unicornonea opened this issue Nov 11, 2021 · 3 comments
Labels

Comments

@unicornonea
Copy link

Describe the bug
validator.isURL is not compatible when upgrading from 13.6.0 to 13.7.0

Examples
const validator = require('validator');
const url = 'http:/some.example.com';
const a = validator.isURL(url.toString(), {
protocols: ['http', 'https'],
require_tld: false
});
console.log(a);
// v13.6.0 a is false
// v13.7.0 a is true

@WikiRik
Copy link
Member

WikiRik commented Nov 11, 2021

Like #1862 this is probably introduced in #1833

@tux-tn
Copy link
Member

tux-tn commented Nov 12, 2021

Actually, this is not a regression, according to RFC 2396 it's a valid URL. Please check the discussion in #1751 for more information.

@renanmontebelo
Copy link
Contributor

I agree this is not a regression, so I believe this issue could be closed.

BTW I find the Wikipedia entry for URL syntax very precise and clear to check for these edge cases: https://en.wikipedia.org/wiki/URL#Syntax

@tux-tn tux-tn closed this as completed Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants