EPUB Output: Remove <script> tags that are children of <body> as Adobe Digital Editions can't handle them

This commit is contained in:
Kovid Goyal 2009-08-21 14:02:47 -06:00
parent 69a9eddfea
commit 1ae9666d87

View File

@ -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)