-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
bugIssue: Works not as designedIssue: Works not as designedduplicateIssue/PR: RedundantIssue/PR: RedundantoutdatedIssue/PR: Open for more than 3 monthsIssue/PR: Open for more than 3 months
Description
There are horizontal lines in the URL, and validation fails, even with the correct URL
from validators import url
url("http://cf_cg.baidu.com/")
ValidationFailure(func=url, args={'value': 'http://cf_cg.baidu.com/', 'public': False})
When look at the URL validation code, that the problem is caused by a regular match.
Position url.py line 73:
r"[a-z\u00a1-\uffff\U00010000-\U0010ffff0-9]+)"
Change the above statement to
r"[a-z\u00a1-\uffff\U00010000-\U0010ffff0-9_]+)"
validate successful.
The domain name validation part also has this problem
Metadata
Metadata
Assignees
Labels
bugIssue: Works not as designedIssue: Works not as designedduplicateIssue/PR: RedundantIssue/PR: RedundantoutdatedIssue/PR: Open for more than 3 monthsIssue/PR: Open for more than 3 months