From 3229fa9f6ca85f673025ad81ef632ea4342dad77 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 28 Oct 2010 16:19:21 -0600 Subject: [PATCH] Fix #7230 (FB2 opening/converting problems) --- src/calibre/ebooks/fb2/input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/fb2/input.py b/src/calibre/ebooks/fb2/input.py index f4f2df9cb5..d135c04fc3 100644 --- a/src/calibre/ebooks/fb2/input.py +++ b/src/calibre/ebooks/fb2/input.py @@ -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)