diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 096f041ca6..bc01cc13cd 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -942,12 +942,12 @@ class Manifest(object): if isinstance(data, etree._Element): ans = xml2str(data, pretty_print=self.oeb.pretty_print) if self.media_type in OEB_DOCS: - # Convert self closing div|span|a tags to normally closed - # ones, as they are interpreted incorrectly by some browser - # based renderers + # Convert self closing div|span|a|video|audio|iframe tags + # to normally closed ones, as they are interpreted + # incorrectly by some browser based renderers ans = re.sub( # tag name followed by either a space or a / - r'<(?Pdiv|a|span)(?=[\s/])(?P[^>]*)/>', + r'<(?Pdiv|a|span|video|audio|iframe)(?=[\s/])(?P[^>]*)/>', r'<\g\g>>', ans) return ans if isinstance(data, unicode):