Fix #7230 (FB2 opening/converting problems)

This commit is contained in:
Kovid Goyal 2010-10-28 16:19:21 -06:00
parent 24a346526d
commit 3229fa9f6c

View File

@ -45,7 +45,7 @@ class FB2Input(InputFormatPlugin):
log.debug('Parsing XML...')
raw = stream.read()
try:
doc = etree.fromstring(raw)
doc = etree.fromstring(raw.replace('\0', ''))
except etree.XMLSyntaxError:
doc = etree.fromstring(raw.replace('& ', '&'))
self.extract_embedded_content(doc)