]> git.phdru.name Git - bookmarks_db.git/commitdiff
  is an entity that needs to be encoded.
authorOleg Broytman <phd@phdru.name>
Mon, 25 Feb 2008 02:44:02 +0000 (02:44 +0000)
committerOleg Broytman <phd@phdru.name>
Mon, 25 Feb 2008 02:44:02 +0000 (02:44 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@185 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/parse_html.py

index 680ad5573a741bb99402449a77d969202e49abde..038cfaf7aa3b0e51be09518f001c9abbda240808 100755 (executable)
@@ -32,7 +32,7 @@ num_entity_re = re.compile("(&#[0-9]+;)")
 def recode_entities(title, charset):
    output = []
    for part in entity_re.split(title):
-      if part not in ("&amp;", "&lt;", "&gt;", "&quote;", "&nbsp;") and \
+      if part not in ("&amp;", "&lt;", "&gt;", "&quote;") and \
             entity_re.match(part):
          part = unichr(name2codepoint.get(part[1:-1], part)).encode(charset)
       output.append(part)