mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-22 00:40:30 +00:00
add question mark to url_needs_quoting charset
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1810 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
0dcd6a8425
commit
2a5d2eac61
1 changed files with 2 additions and 2 deletions
|
|
@ -309,12 +309,12 @@ def match_host (host, domainlist):
|
|||
return False
|
||||
|
||||
|
||||
_safe_url_chars = re.compile(r"^[-a-zA-Z0-9_:/\.,~;=&#%()@]*$")
|
||||
_safe_url_chars = re.compile(r"^[-a-zA-Z0-9_:/\.,~;=&#%()@\?]*$")
|
||||
def url_needs_quoting (url):
|
||||
"""Check if url needs percent quoting. Note that the method does
|
||||
only check basic character sets, and not any other syntax.
|
||||
The URL might still be syntactically incorrect even when
|
||||
it is properly quoted..
|
||||
it is properly quoted.
|
||||
"""
|
||||
if url.rstrip() != url:
|
||||
# handle trailing whitespace as a special case
|
||||
|
|
|
|||
Loading…
Reference in a new issue