mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-17 06:20:27 +00:00
Fix critical exception when parsing a URL with a ]
e.g.: <a href="http://localhost]">square</a> Causes urllib to raise a ValueError: File "/usr/lib/python3.8/site-packages/linkcheck/url.py", line 315, in url_norm line: urlparts = list(urllib.parse.urlsplit(url)) locals: urlparts = <not found> list = <builtin> <class 'list'> urllib = <global> <module 'urllib' from '/usr/lib/python3.8/urllib/__init__.py'> urllib.parse = <global> <module 'urllib.parse' from '/usr/lib/python3.8/urllib/parse.py'> urllib.parse.urlsplit = <global> <function urlsplit at 0x7f950e699e50> url = <local> 'http://localhost]', len = 17 File "/usr/lib/python3.8/urllib/parse.py", line 440, in urlsplit line: raise ValueError("Invalid IPv6 URL") locals: ValueError = <builtin> <class 'ValueError'>
This commit is contained in:
parent
a977e4d712
commit
d5690203fc
1 changed files with 1 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ from dns.exception import DNSException
|
|||
# Catch these exception on syntax checks.
|
||||
ExcSyntaxList = [
|
||||
LinkCheckerError,
|
||||
ValueError,
|
||||
]
|
||||
|
||||
# Catch these exceptions on content and connect checks. All other
|
||||
|
|
|
|||
Loading…
Reference in a new issue