From 69a1126bf9c54a1aa8b6bb8a24b00e198981b87a Mon Sep 17 00:00:00 2001 From: "Marshall T. Vandegrift" Date: Sun, 25 Jan 2009 18:30:30 -0500 Subject: [PATCH] Correct for broken (Penguin) in-line SVG --- src/calibre/ebooks/oeb/base.py | 7 +++++++ 1 file changed, 7 insertions(+) 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( + '