View Full Version : protect displayed email from spambots?

02-12-2008, 05:49 PM
If I want to display an email address on my site, how do I protect it from spambots?

02-12-2008, 05:53 PM
If it’s published on the web as text/HTML there’s no chance to hide it from anyone/anything. You can make it a little harder for spambots (at least the poorly programmed ones) by encrypting the characters with hex entities, though. Or you could put it as image. That will hide it from any non-visual device, though (i.e. won’t be very accessible).

02-12-2008, 05:57 PM
what's a hex entity?

02-12-2008, 06:02 PM
An HTML entity encoded as hexadecimal number: http://www.ascii.cl/htmlcodes.htm


02-12-2008, 06:09 PM
Thank you!

02-13-2008, 12:53 PM
Or instead of putting the entire email as an image, you could just put the @ sign and the dot as a an image!

02-13-2008, 03:18 PM
I heard you could hide it by building it in javascript so they can't scrub the source page code.

02-13-2008, 04:11 PM
I've got two ways on mine, that are supposed to help hide the e-mail from bots... but they are very long-winded!

But it parses the characters here, dammit! It consists of javascript and hex values, and then a noscript with the same values for those that don't have js enabled

02-13-2008, 04:49 PM
But it parses the characters here, dammit!

Wrap your stuff in BB tags.

02-13-2008, 05:09 PM
Wrap your stuff in BB tags.

Tried that one, but still escaped the data... I shall try once again...

Nope... still displays the actual characters