parent
a8c1273682
commit
7be32dd70c
@ -85,9 +85,10 @@ def _is_url_naive(urlstr):
|
||||
else:
|
||||
# Valid IPv4/IPv6 address
|
||||
return True
|
||||
if re.search(r'^[0-9.]+$', urlstr):
|
||||
# Qt treats things like "23.42" or "1337" as valid URLs which we don't
|
||||
# want to. Note we already filtered *real* valid IPs above.
|
||||
if re.search(r'^([0-9.]+|0x[a-fA-F0-9]+)$', urlstr):
|
||||
# Qt treats things like "23.42" or "1337" or "0xDEAD" as valid URLs
|
||||
# which we don't want to. Note we already filtered *real* valid IPs
|
||||
# above.
|
||||
return False
|
||||
elif not url.isValid():
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user