diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 2bc898748d..163ac34cef 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -331,6 +331,13 @@ class Manifest(object): def _force_xhtml(self, data): if self.oeb.encoding is not None: data = data.decode(self.oeb.encoding, 'replace') + # Handle broken XHTML w/ SVG (ugh) + if 'svg:' in data and SVG_NS not in data: + data = data.replace( + '