From bcbbe6ff6015f6cfd3eea59cc65ad83eb8c98d0f Mon Sep 17 00:00:00 2001 From: calvin Date: Sat, 12 Nov 2005 19:56:46 +0000 Subject: [PATCH] allow https js urls git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2935 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/url.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linkcheck/url.py b/linkcheck/url.py index 6c24c46a..ec2030cb 100644 --- a/linkcheck/url.py +++ b/linkcheck/url.py @@ -51,7 +51,7 @@ _safe_char = r"([%(_az09)s%(_path)s\+]|"\ _safe_scheme_pattern = r"(https?|ftp)" _safe_domain_pattern = r"([%(_az09)s][%(_az09)s\-]*"\ r"(\.[%(_az09)s][%(_az09)s\-]*)*\.?)" % _basic -_safe_host_pattern = _safe_domain_pattern+r"(:(80|8080|8000))?" % _basic +_safe_host_pattern = _safe_domain_pattern+r"(:(80|8080|8000|443))?" % _basic _safe_path_pattern = r"((/([%(_az09)s%(_path)s]|"\ r"(%%[%(_hex_safe)s][%(_hex_full)s]))+)*/?)" % _basic _safe_fragment_pattern = r"%s*" % _safe_char @@ -92,7 +92,7 @@ def is_safe_js_url (urlstr): Test javascript URL strings. """ url = list(urlparse.urlsplit(urlstr)) - if url[0].lower() != 'http': + if url[0].lower() not in ('http', 'https'): return False if not is_safe_host(url[1]): return False