To put email addresses on my sites, I use this Javascript :
function showEmailLink(user, domain, linkText) { if (linkText == "") { linkText = user + "@" + domain; } return document.write("<a href=" + "mail" + "to:" + user + "@" + domain + ">" + linkText + "<\/a>"); }
so in my HTML I can write this:
please send me an <script type="text/javascript"> </script>
This protects my site from spammers who collect email addresses using screencraping source code, since my text is not in the text.
However, I cannot imagine that a motivated spammer could not in any way create a screenshot file that could mechanically determine an email address based on this javascript and HTML code.
How safe is this javascript email explanation method actually?
javascript html email-spam obfuscation spam-prevention
Edward tanguay
source share