Skip to content

Commit c87655f

Browse files
committed
url: relax check to ignore semicolons in URLs
* according to RFC 1738 section 2.2, semicolons are reserved but valid characters in URIs * `urllib.parse.urlparse()` interprets semicolons as `params` * thus, the check for no params in `is_url()` returns `False` for some valid URLs
1 parent 181b3db commit c87655f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

idutils/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def is_purl(val):
172172
def is_url(val):
173173
"""Test if argument is a URL."""
174174
res = urlparse(val)
175-
return bool(res.scheme and res.netloc and res.params == "")
175+
return bool(res.scheme and res.netloc)
176176

177177

178178
def is_lsid(val):

0 commit comments

Comments
 (0)