From: Oleg Broytman Date: Sun, 8 Aug 2010 20:55:58 +0000 (+0000) Subject: Fixed a bug. X-Git-Tag: v4.5.3~131 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=d34baee8262c0e74ea3aaf142f9f570449e9787e;hp=175fd609f66d49555c9c491437696fed2e8ef102;p=bookmarks_db.git Fixed a bug. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@245 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/parse_html.py b/Robots/parse_html.py index fd8dc92..66400b5 100755 --- a/Robots/parse_html.py +++ b/Robots/parse_html.py @@ -35,11 +35,9 @@ def recode_entities(title, charset): if part not in ("&", "<", ">", """) and \ entity_re.match(part): _part = name2codepoint.get(part[1:-1], None) - if _part is None: - _part = part - else: - _part = unichr(_part).encode(charset) - output.append(_part) + if _part is not None: + part = unichr(_part).encode(charset) + output.append(part) title = ''.join(output) output = []