Revision [16811]

This is an old revision of SpamSafeEmail made by NfiV72 on 2007-05-31 10:50:07.

 

SpamSafeEmail


While the "fairly" EmailActionInfo spam safe email is good, there is an alternative to javascript wich as of today can still be turned off or simply not work for some people. This solution encodes the email link and change the text into a bot safe text.

Original code...
// check for email addresses
if (preg_match("/^. \@. $/", $tag))
{
    $url = "mailto:".$tag;
}


Modified code...
%%(php)
if (preg_match("/^. \@. $/", $tag))
{
If the text was empty and got the email, we turned the email
to a bot safe format.
if ($text
{
$text = htmlspecialchars(str_replace(array('@', '.'), array(' [at] ', ' [dot] '), $text));
}
We then encode the full link
$mailto = "
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki