From 5f0660d1f4a0b73918e44c3c1a835e64ca6f9650 Mon Sep 17 00:00:00 2001 From: calvin Date: Mon, 25 Oct 2004 21:24:11 +0000 Subject: [PATCH] unicode fixes git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1861 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/linkparse.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/linkcheck/linkparse.py b/linkcheck/linkparse.py index 75389626..0305afac 100644 --- a/linkcheck/linkparse.py +++ b/linkcheck/linkparse.py @@ -141,20 +141,21 @@ class LinkFinder (TagFinder): if attr in attrs: # name of this link if tag == 'a' and attr == 'href': - name = linkcheck.strformat.unquote(attrs.get('title', '')) + name = linkcheck.strformat.unquote( + attrs.get('title', u'')) if not name: name = linkcheck.linkname.href_name( self.content[self.parser.pos():]) elif tag == 'img': - name = linkcheck.strformat.unquote(attrs.get('alt', '')) + name = linkcheck.strformat.unquote(attrs.get('alt', u'')) if not name: name = linkcheck.strformat.unquote( - attrs.get('title', '')) + attrs.get('title', u'')) else: - name = "" + name = u"" # possible codebase if tag in ('applet', 'object'): - base = linkcheck.strformat.unquote(attrs.get('codebase')) + base = linkcheck.strformat.unquote(attrs.get('codebase', '')) else: base = "" value = linkcheck.strformat.unquote(attrs[attr])