View Single Post
Old 05-30-2020, 09:30 AM   #1001
warrimoo
Junior Member
warrimoo began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2020
Device: Apple Shubook app
Quote:
Originally Posted by davidfor View Post
That will only work if the first attribute of the tag is the href. Just searching for the href="http is probably enough. Though if the search is using regex, that would be better.

But, that probably isn't it. If the URLs are being opened automatically, it isn't via links. It's probably some Javascript. You probably want to search for that and then use the Modify ePub plugin to remove it. Of course, without actually seeing a sample, we can't be sure what is actually happening.
Thanks, and Yes, in this particular case the script looks like this:


<noscript><!-- BEGIN STANDARD TAG - 728 x 90 - Lycos - Angelfire Fallthrough - DO NOT MODIFY -->
<iframe class="calibre5" frameborder="0" height="90" marginheight="0" marginwidth="0" scrolling="no" src="http://ad.yieldmanager.com/st?ad_type=iframe&amp;ad_size=728x90&amp;section=2 80303" width="728"></iframe> <!-- END TAG --></noscript>

The preview in the Calibre editor fires this script from the <body> as well. So it would be really good to have a way to generically detect and deactivate this sort of code without directly opening the editor. I guess a regexp check for <noscript> is probably a first pass for the more literate, but adding functionality to the plugins might be helpful for everyone. The payload in this particular case is mild.

Thanks again.
warrimoo is offline   Reply With Quote