mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix #1488 (epub: displays JavaScript at the top on PRS-505)
This commit is contained in:
parent
c667ad16a6
commit
e84cad0ad8
@ -123,6 +123,10 @@ class HTMLProcessor(Processor, Rationalizer):
|
|||||||
if opts.verbose > 2:
|
if opts.verbose > 2:
|
||||||
self.debug_tree('nocss')
|
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):
|
def convert_image(self, img):
|
||||||
rpath = img.get('src', '')
|
rpath = img.get('src', '')
|
||||||
path = os.path.join(os.path.dirname(self.save_path()), *rpath.split('/'))
|
path = os.path.join(os.path.dirname(self.save_path()), *rpath.split('/'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user