Skip to content

Commit

Permalink
make life just a little harder for spammers
Browse files Browse the repository at this point in the history
  • Loading branch information
rjw57 committed Aug 24, 2012
1 parent d82b317 commit 5e52cdb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.in.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ <h1>Dr Richard Wareham</h1>
<div class="span3 contact-pane">
<table class="contact-information">
<tr>
<!-- The email address link itself is filled in via JavaScript to make life a little harder for spammers. -->
<td class="contact-type"><abbr title="email address" class="icon icon-envelope"><span class=
"accessibility-label">Email:</span></abbr></td>

<td>
<a href="mailto:rjw57@cantab.net">rjw57@cantab.net</a>
<!-- We do not use JavaScript obfuscation here because I want the page to render without JavaScript -->
<a id="email-address">rj<span style="display:none;">REMOVETHIS</span>w57<!-- -->@<!-- -->can<!-- -->tab.net</a>
</td>
</tr>

Expand Down Expand Up @@ -321,6 +323,11 @@ <h2>Design &amp; Theatre</h2>
</div>
</section>
</div>
<script>
// This is just a way to stop the email address being trivially parseable by a spam bot. It is at best obfuscation.
var address = 'mail' + 'to' + ':rjw' + (32 + 25) + String.fromCharCode(64) + 'batnac'.split('').reverse().join('') + '.net';
document.getElementById('email-address').setAttribute('href', address);
</script>
</body>
</html>

Expand Down

0 comments on commit 5e52cdb

Please sign in to comment.