]> git.phdru.name Git - bookmarks_db.git/commitdiff
Fixed a bug.
authorOleg Broytman <phd@phdru.name>
Sun, 8 Aug 2010 20:55:58 +0000 (20:55 +0000)
committerOleg Broytman <phd@phdru.name>
Sun, 8 Aug 2010 20:55:58 +0000 (20:55 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@245 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/parse_html.py

index fd8dc927c0d78d7adcd8394457774450ff9dd403..66400b5fd4b711106d9f44a866ecaceece972f8d 100755 (executable)
@@ -35,11 +35,9 @@ def recode_entities(title, charset):
       if part not in ("&amp;", "&lt;", "&gt;", "&quot;") 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 = []