mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #2003 (lrs2lrf mistranslates XML entities)
This commit is contained in:
parent
05329f8ca1
commit
06f67d6cde
@ -28,8 +28,9 @@ class LrsParser(object):
|
||||
def __init__(self, stream, logger):
|
||||
self.logger = logger
|
||||
src = stream.read()
|
||||
self.soup = BeautifulStoneSoup(xml_to_unicode(src)[0],
|
||||
selfClosingTags=self.SELF_CLOSING_TAGS)
|
||||
self.soup = BeautifulStoneSoup(xml_to_unicode(src)[0],
|
||||
convertEntities=BeautifulStoneSoup.XML_ENTITIES,
|
||||
selfClosingTags=self.SELF_CLOSING_TAGS)
|
||||
self.objects = {}
|
||||
for obj in self.soup.findAll(objid=True):
|
||||
self.objects[obj['objid']] = obj
|
||||
|
Loading…
x
Reference in New Issue
Block a user