From: Oleg Broytman Date: Sun, 11 Dec 2011 03:27:18 +0000 (+0000) Subject: Convert to unicode and back again to unescape unichr'd entities. X-Git-Tag: v4.5.3~32 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=643f6e704848a0aa271d1bbe460200ab6d6e4613;p=bookmarks_db.git Convert to unicode and back again to unescape unichr'd entities. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@344 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/bkmk_objects.py b/bkmk_objects.py index 281b95c..4847e2c 100644 --- a/bkmk_objects.py +++ b/bkmk_objects.py @@ -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("&", '&')) - title = title.replace("'", "'") + title = HTMLParser().unescape(title.replace("&", '&').decode('utf-8')) + title = title.encode('utf-8').replace("'", "'") return title