mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-24 10:45:08 +01:00
AZW3 Output: Fix handling of & < and > entities in the text. They were being incorrectly unescaped.
This commit is contained in:
parent
e5d1e81e17
commit
761cb5509c
1 changed files with 2 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
|||
import re
|
||||
from collections import namedtuple
|
||||
from functools import partial
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
from lxml import etree
|
||||
|
||||
|
|
@ -289,6 +290,7 @@ def step_into_tag(self, tag, chunks):
|
|||
self.chunk_selector = ('S', aid)
|
||||
|
||||
def chunk_up_text(self, text):
|
||||
text = escape(text)
|
||||
text = text.encode('utf-8')
|
||||
ans = []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue