mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
466f73159e
commit
ed603d914b
@ -942,12 +942,12 @@ class Manifest(object):
|
|||||||
if isinstance(data, etree._Element):
|
if isinstance(data, etree._Element):
|
||||||
ans = xml2str(data, pretty_print=self.oeb.pretty_print)
|
ans = xml2str(data, pretty_print=self.oeb.pretty_print)
|
||||||
if self.media_type in OEB_DOCS:
|
if self.media_type in OEB_DOCS:
|
||||||
# Convert self closing div|span|a tags to normally closed
|
# Convert self closing div|span|a|video|audio|iframe tags
|
||||||
# ones, as they are interpreted incorrectly by some browser
|
# to normally closed ones, as they are interpreted
|
||||||
# based renderers
|
# incorrectly by some browser based renderers
|
||||||
ans = re.sub(
|
ans = re.sub(
|
||||||
# tag name followed by either a space or a /
|
# tag name followed by either a space or a /
|
||||||
r'<(?P<tag>div|a|span)(?=[\s/])(?P<arg>[^>]*)/>',
|
r'<(?P<tag>div|a|span|video|audio|iframe)(?=[\s/])(?P<arg>[^>]*)/>',
|
||||||
r'<\g<tag>\g<arg>></\g<tag>>', ans)
|
r'<\g<tag>\g<arg>></\g<tag>>', ans)
|
||||||
return ans
|
return ans
|
||||||
if isinstance(data, unicode):
|
if isinstance(data, unicode):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user