MyCode Hide email in posts
#1
This MyCode will make the emails unreadable for bots, replacing the "@" character with "[AT]" and "." with "[DOT]'

Regexp
Code:
([A-Z0-9._%+-]+)@([A-Z0-9.-]+)\.([A-Z]{2,4})

Replacement
Code:
<a href="#" rel="nofollow" style="padding-left:20px; background: url(./images/buttons_sprite.png) no-repeat; background-position:0 -40px;" onclick="this.href='mailto:' + '$1' + '@' + '$2' + '.' + '$3'">$1 [AT] $2 [DOT] $3</a>

Test
Code:
my email is [email protected]
my email is crazycat [AT] c-p-f [DOT] org
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)