From 517a8d82cd0cffcff1d96123633e8a79e6b94e74 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 28 Mar 2011 08:46:21 -0600 Subject: [PATCH] EPUB Input: Workaround for invalid EPUBs produced by someone named 'ibooks, Inc.'. Fixes #744122 (Conversion of epub failed) --- src/calibre/ebooks/oeb/reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/reader.py b/src/calibre/ebooks/oeb/reader.py index 4a09e0b1d4..ebc2f30d00 100644 --- a/src/calibre/ebooks/oeb/reader.py +++ b/src/calibre/ebooks/oeb/reader.py @@ -103,8 +103,8 @@ class OEBReader(object): data = self.oeb.container.read(None) data = self.oeb.decode(data) data = XMLDECL_RE.sub('', data) - data = data.replace('http://openebook.org/namespaces/oeb-package/1.0', - OPF1_NS) + data = re.sub(r'http://openebook.org/namespaces/oeb-package/1.0(/*)', + OPF1_NS, data) try: opf = etree.fromstring(data) except etree.XMLSyntaxError: