From: Oleg Broytman Date: Mon, 11 Feb 2008 20:11:30 +0000 (+0000) Subject: Encode entities. X-Git-Tag: v4.5.3~203 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ca8624faf5b9a31e76b7bf3d441f446c8b62c8f6;p=bookmarks_db.git Encode entities. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@173 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/bkmk_parser.py b/bkmk_parser.py index 41df9ef..4cc8897 100644 --- a/bkmk_parser.py +++ b/bkmk_parser.py @@ -45,7 +45,7 @@ class BkmkParser(HTMLParser): def handle_data(self, data): if data: if DEFAULT_CHARSET: - data = unicode(data, self.charset, "replace").encode(DEFAULT_CHARSET, "replace") + data = unicode(data, self.charset, "replace").encode(DEFAULT_CHARSET, "xmlcharrefreplace") self.accumulator += data