add pipe to safe url chars

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1950 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-11-09 17:55:03 +00:00
parent 088cf521a8
commit 7ee019da0f

View file

@ -316,7 +316,8 @@ def match_host (host, domainlist):
return False
_safe_url_chars = re.compile(r"^[-a-zA-Z0-9_:/\.,~;=&#%()@\?]*$")
_safe_url_chars = r"-a-zA-Z0-9_:/\.,~;=&#%()@\?\|"
_safe_url_chars_ro = re.compile(r"^[%s]*$" % _safe_url_chars)
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.
@ -327,7 +328,7 @@ def url_needs_quoting (url):
# handle trailing whitespace as a special case
# since '$' matches immediately before a end-of-line
return True
return not _safe_url_chars.match(url)
return not _safe_url_chars_ro.match(url)
def spliturl (url):