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:
calvin 2004-09-16 21:16:42 +00:00
parent 0dcd6a8425
commit 2a5d2eac61

View file

@ -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