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):
|
||||
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'<(?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)
|
||||
return ans
|
||||
if isinstance(data, unicode):
|
||||
|
Loading…
x
Reference in New Issue
Block a user