From: Oleg Broytman Date: Thu, 11 Oct 2007 15:56:22 +0000 (+0000) Subject: Ignore case for comparison. X-Git-Tag: v4.5.3~286 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=a6dd530445b282c35407f40bf83160bb6cf8dfb3;p=bookmarks_db.git Ignore case for comparison. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@90 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/parse_html.py b/Robots/parse_html.py index 90b777b..c6a72f6 100755 --- a/Robots/parse_html.py +++ b/Robots/parse_html.py @@ -71,15 +71,13 @@ class HTMLParser(_HTMLParser): for attrname, value in attrs: if value: value = value.strip().lower() - if (attrname == 'rel') and (value in ('icon', 'shortcut icon')): + if (attrname == 'rel') and (value.lower() in ('icon', 'shortcut icon')): has_icon = True elif attrname == 'href': href = value if has_icon: self.icon = href - else: - self.icon = None import re