I figured I could use this simple approach to create a low-level spam filter in jQuery –
<a class="filter" href="mailto:johndoe[at]nowhere[dot]com">johndoe[at]nowhere[dot]com</a>
$('.filter').each(function() {
$(this).html().replace(('[dot]', '.'));
$(this).html().replace(('[at]', '@'));
});
But nothing happens. The native replace function doesn’t seem to cope with jQuery. I’ve also tried fetching the contents using val() and text(). Maybe this is altogether an incorrect method, if it is I’d appreciate some directions.
Use the following: