how to replace unwanted footer text?
---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
html code footer:
<span class="Apple-converted-space"> </span><br><br><br>---<span class="Apple-converted-space"> </span><br>
This email has been checked for viruses by Avast antivirus software.<span class="Apple-converted-space"> </span><br>
<a href="http://www.avast.com" style="text-decoration: none; color: rgb(22, 54, 87); ">
http://www.avast.com</a></span></span>
almost done, but I think the code can be placed on one line
document.getElementById('footer').innerHTML = data;
data = data.replace(/---.*/gi, '');
data = data.replace((/(<br>This email has.*).+?/gi, '');
data = data.replace((/(http:\/\/www\.avast\.com)<\/a>?(<br\s*\/?>{2,3})?/gi, '');
document.getElementById('footer').innerHTML = data;
an example found in a forum
data = data.replace(/(<br>){2,3}---(<br>This).+?(avast\.com)<\/a>( ---)?/gi, '');
the code above will workt in plain html, it won't work with the generated code by WebKit
){2,3}---(
This).+?(avast\.com)<\/a>( ---)?/gi, ''); the semicolon was a bad copy & paste it's just a part of the code: The code works accept the
part won't replace, that's because the WebKit I think it can be improved BTW it's not on a server site but a local program. Thnx for your reply. – Strike01 Jan 04 '15 at 16:27