AZW3 Output: Fix handling of & < and > entities in the text. They were being incorrectly unescaped.

This commit is contained in:
Kovid Goyal 2012-09-23 21:52:36 +05:30
parent e5d1e81e17
commit 761cb5509c

View File

@ -10,6 +10,7 @@ __docformat__ = 'restructuredtext en'
import re
from collections import namedtuple
from functools import partial
from xml.sax.saxutils import escape
from lxml import etree
@ -289,6 +290,7 @@ class Chunker(object):
self.chunk_selector = ('S', aid)
def chunk_up_text(self, text):
text = escape(text)
text = text.encode('utf-8')
ans = []