View Single Post
Old 05-23-2012, 02:02 PM   #135
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
@kiwidude

I'm finding some books with inline javascript...

Quote:
<script src="../Misc/insertSpan.js" type="text/javascript">
</script>
...where the js file is found in the folder "Misc".

I didn't know epub readers could execute js but it looks like the can execute a subset of functions.

For instance:

Quote:
alert('some text')
will be executed, whereas
Quote:
location.replace('http:/www.google.com')
will not, and that's good news...for now.

I was thinking if you could add a kind of check for embedded js files as you do with Adobe stuff or embedded fonts. Or probably a more generic check for files in the Misc folder. Sometimes you can find a lot of MS Word cruft in that folder.
paulfiera is offline   Reply With Quote