mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 10:42:58 +02:00
LRF Input: Handle ampersands and other XML reserved characters correctly when converting LRF documents. Fixes #4923 (Ampersands in input text get lost in output)
This commit is contained in:
parent
c2f655ad71
commit
f4bbf10ee3
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
import struct, array, zlib, cStringIO, collections, re
|
||||
|
||||
from calibre.ebooks.lrf import LRFParseError, PRS500_PROFILE
|
||||
from calibre import entity_to_unicode
|
||||
from calibre import entity_to_unicode, prepare_string_for_xml
|
||||
from calibre.ebooks.lrf.tags import Tag
|
||||
|
||||
ruby_tags = {
|
||||
|
|
@ -870,7 +870,7 @@ def __unicode__(self):
|
|||
open_containers = collections.deque()
|
||||
for c in self.content:
|
||||
if isinstance(c, basestring):
|
||||
s += c
|
||||
s += prepare_string_for_xml(c)
|
||||
elif c is None:
|
||||
if open_containers:
|
||||
p = open_containers.pop()
|
||||
|
|
|
|||
Loading…
Reference in a new issue