mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-12 00:23:12 +00:00
unicode fixes
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1861 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
ddf49edefc
commit
5f0660d1f4
1 changed files with 6 additions and 5 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Reference in a new issue