Web Design Port Elizabeth, St Francis Bay, South Africa | Black Alsatian Technologies
guided by passion.. 

Convert mailto links to htmlentities


As a web designer I am sure you have often had a client who insists on having their email addresses displayed on their website. But any good web developer knows that it is a big no-no to do this. Spam mail harvesters come along and harvest these unprotected email addresses and the next thing you know you are getting emails about discounted Viagra and stock market plummets in the Ukraine.

Long ago I found a website where you could insert the email address and it will automatically convert it to it's htmlentities equivalent and give you the code to copy and paste into your web page. I'm sure I bookmarked it, but as any web designer knows, you end up with thousands of bookmarks which you can never sort through to find that one web page you looked at 2 years ago.

So I started Googling again and came across this neat little function which you can just put an include to in your scripts and call the function wherever you need to insert an email address on a web page.

Many thanks to the developer, you can find it here, Obfuscate Mailto.


Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! TwitThis Joomla Free PHP

Site News

Banner