From 7ee019da0ffefc332b2a5c5917cbc679618c6e48 Mon Sep 17 00:00:00 2001 From: calvin Date: Tue, 9 Nov 2004 17:55:03 +0000 Subject: [PATCH] add pipe to safe url chars git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1950 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/url.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linkcheck/url.py b/linkcheck/url.py index 5755cab2..0191d94e 100644 --- a/linkcheck/url.py +++ b/linkcheck/url.py @@ -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):