From 5246859ad0277a7130d6dad11aa67ff0bc6e42b7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 9 Oct 2013 09:28:23 +0530 Subject: [PATCH] EPUB Output: Do not strip tags with type application/svg+xml EPUB Output: Do not strip tags with type application/svg+xml in addition to those that use image/svg+xml. Fixes #1236845 [Conversion - Missing Images](https://bugs.launchpad.net/calibre/+bug/1236845) --- src/calibre/ebooks/conversion/plugins/epub_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/conversion/plugins/epub_output.py b/src/calibre/ebooks/conversion/plugins/epub_output.py index 5569be4304..57f06e17ba 100644 --- a/src/calibre/ebooks/conversion/plugins/epub_output.py +++ b/src/calibre/ebooks/conversion/plugins/epub_output.py @@ -410,7 +410,7 @@ class EPUBOutput(OutputFormatPlugin): for tag in XPath('//h:embed')(root): tag.getparent().remove(tag) for tag in XPath('//h:object')(root): - if tag.get('type', '').lower().strip() in ('image/svg+xml',): + if tag.get('type', '').lower().strip() in {'image/svg+xml', 'application/svg+xml'}: continue tag.getparent().remove(tag)