You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The validators.url() function is returning a ValidationError for a URL that is valid on a browser. However, it might not comply the standards.
The issue in above URL is, it has a & immediately followed by ?, which does not comply the standards but is a valid URL.
Steps to Reproduce:
Install the latest version of the validators library
Run the following code:
import validators
url = "https://www.cheapoair.com/air/listing?&d1=SJC&r1=AMD&dt1=11/04/2024&d2=AMD&r2=SJC&dt2=11/16/2024&tripType=ROUNDTRIP&cl=ECONOMY&ad=1&se=0&ch=0&infs=0&infl=0"
result = validators.url(url)
print(result)
Expected Behavior:
The function should return True, indicating a valid URL.
Actual Behavior:
The function returns a ValidationError.
Cheapoair is a popular website and some other travel websites I obeserved have this issue as well. Should this be considered as bug and be fixed it. Or is this an expected behavior flagging this URLs.
The text was updated successfully, but these errors were encountered:
Description:
The validators.url() function is returning a ValidationError for a URL that is valid on a browser. However, it might not comply the standards.
The issue in above URL is, it has a
&
immediately followed by?
, which does not comply the standards but is a valid URL.Steps to Reproduce:
Expected Behavior:
Actual Behavior:
Cheapoair
is a popular website and some other travel websites I obeserved have this issue as well. Should this be considered as bug and be fixed it. Or is this an expected behavior flagging this URLs.The text was updated successfully, but these errors were encountered: