Fix #1488 (epub: displays JavaScript at the top on PRS-505)

This commit is contained in:
Kovid Goyal 2008-12-30 10:06:45 -08:00
parent c667ad16a6
commit e84cad0ad8

View File

@ -123,6 +123,10 @@ class HTMLProcessor(Processor, Rationalizer):
if opts.verbose > 2:
self.debug_tree('nocss')
if hasattr(self.body, 'xpath'):
for script in list(self.body.xpath('descendant::script')):
script.getparent().remove(script)
def convert_image(self, img):
rpath = img.get('src', '')
path = os.path.join(os.path.dirname(self.save_path()), *rpath.split('/'))