]> git.phdru.name Git - bookmarks_db.git/commitdiff
Convert to unicode and back again to unescape unichr'd entities.
authorOleg Broytman <phd@phdru.name>
Sun, 11 Dec 2011 03:27:18 +0000 (03:27 +0000)
committerOleg Broytman <phd@phdru.name>
Sun, 11 Dec 2011 03:27:18 +0000 (03:27 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@344 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

bkmk_objects.py

index 281b95c0f57747f0a728b27046b587bd49556c89..4847e2c991c53ba5beb4b474a7913d1313108e15 100644 (file)
@@ -214,6 +214,6 @@ def quote_title(title):
 def unquote_title(title):
    if BKMK_FORMAT == "MOZILLA":
       from HTMLParser import HTMLParser
-      title = HTMLParser().unescape(title.replace("&amp;", '&'))
-      title = title.replace("&#39;", "'")
+      title = HTMLParser().unescape(title.replace("&amp;", '&').decode('utf-8'))
+      title = title.encode('utf-8').replace("&#39;", "'")
    return title