mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 10:04:17 +02: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
1 changed files with 2 additions and 0 deletions
|
|
@ -312,6 +312,8 @@ def workaround_ade_quirks(self):
|
|||
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…
Reference in a new issue