From 224f5e723b3c111f4542c622f88f4aa7c14d6de7 Mon Sep 17 00:00:00 2001 From: calvin Date: Tue, 16 May 2006 22:05:17 +0000 Subject: [PATCH] don't find link name in empty urls git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3218 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/linkparse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linkcheck/linkparse.py b/linkcheck/linkparse.py index 1dbb884f..4ffb33a1 100644 --- a/linkcheck/linkparse.py +++ b/linkcheck/linkparse.py @@ -223,13 +223,13 @@ class LinkFinder (TagFinder): assert isinstance(url, unicode) or url is None, repr(url) urls = [] # look for meta refresh - if tag == u'meta': + if tag == u'meta' and url: mo = refresh_re.match(url) if mo: urls.append(mo.group("url")) elif attr != 'content': urls.append(url) - elif attr == u'style': + elif attr == u'style' and url: for mo in css_url_re.finditer(url): u = mo.group("url") urls.append(unquote(u, matching=True))