mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
EPUB Output: Remove <script> tags that are children of <body> as Adobe Digital Editions can't handle them
This commit is contained in:
parent
69a9eddfea
commit
1ae9666d87
@ -312,6 +312,8 @@ class EPUBOutput(OutputFormatPlugin):
|
||||
for tag in XPath('//h:script')(root):
|
||||
if not tag.text and not tag.get('src', False):
|
||||
tag.getparent().remove(tag)
|
||||
for tag in XPath('//h:body/descendant::h:script')(root):
|
||||
tag.getparent().remove(tag)
|
||||
|
||||
for tag in XPath('//h:form')(root):
|
||||
tag.getparent().remove(tag)
|
||||
|
Loading…
x
Reference in New Issue
Block a user