-
Notifications
You must be signed in to change notification settings - Fork 162
URLs validation should use urlparse #189
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
Comments
It doesn't validate though, parses sure, but validating with it is not good. http:////.google.com would be considered valid based on urllib. |
You're right, it would, and is a valid URL:
path might not be a valid domain name, but that's an entirely different problem. Interestingly enough, http:////.google.com works fine if you type it into your address bar in Chrome, though it fails if you click that link. http:////google.com works, though. |
well, technically it's wrong to place that for the 'path', google.com should be the 'netloc'? |
Well, it is the path, strictly speaking, and should be rejected because there is no netloc. Just because it's a real URL doesn't mean you can get there from here 🤣 |
Awesome! Thanks for your efforts 🎉🚀👍 |
Python already parses URLs, and does it correctly:
I had to chase down this library because click-params uses validators to validate URLs, but totally valid URLs aren't parsed correctly because the scheme wasn't expected by this library 😞
The text was updated successfully, but these errors were encountered: