EPUB Output: Do not strip <object> tags with type application/svg+xml

EPUB Output: Do not strip <object> 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)
This commit is contained in:
Kovid Goyal 2013-10-09 09:28:23 +05:30
parent f0d65fa0c2
commit 5246859ad0

View File

@ -410,7 +410,7 @@ class EPUBOutput(OutputFormatPlugin):
for tag in XPath('//h:embed')(root): for tag in XPath('//h:embed')(root):
tag.getparent().remove(tag) tag.getparent().remove(tag)
for tag in XPath('//h:object')(root): 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 continue
tag.getparent().remove(tag) tag.getparent().remove(tag)