WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Anti-spam email links in Javascript

for

From: Randy Pearson
Date: Apr 8, 2004 10:06AM


We have a function in our (server-side) library that munges the email
addresses so that they still look normal and act normal, but most harvesters
that look for email address "patterns" will not notice them.

Here's the function. It's written in Visual FoxPro, but you get the idea:

FUNCTION HTMunge(tcEmail)
tcEmail = ;
STRTRAN(;
STRTRAN(;
STRTRAN(;
STRTRAN( m.tcEmail, "@", "@"), ;
".", "."), ;
":", ":"),
"m", "m")
RETURN m.tcEmail
ENDFUNC

-- Randy

> -----Original Message-----
> From: Mike Brockington [mailto: <EMAIL REMOVED> ]
> Sent: Thursday, April 08, 2004 11:22 AM
> To: <EMAIL REMOVED>
> Subject: Anti-spam email links in Javascript
>
> I have been asked to produce a public-facing page containing
> email links. The user wants to avoid spam, but also wants to
> have AAA accessibility, which appears to be mutually
> exclusive. The page is produced by JSP, so I can write
> whatever HTML / Javascript I like, but I can't see how to get
> around the problem that a browser which does not have
> Javascript enabled will not be able to display the email address.
> Is it acceptable to use a <no-script> tag to say something
> like: "email address obscured due to spam" ?
> This would seem to me to go against the general principle of
> providing alternate versions of non-accessible content.
> The only other option that I have been able to think of is to
> have the <noscript> section provide a link to a form-mail
> page. Do you think that this counts as 'equivalent' to a mailto: link?
>
> Mike
>
>
>
>
> Check planning applications from your office or home
> www.edinburgh.gov.uk/planning
> Pay for on-street parking in central Edinburgh from your mobile phone
> www.edinburgh.gov.uk/mpark
> More at www.edinburgh.gov.uk/onlineservices
> **********************************************************************
> This Email and files transmitted with it are confidential and
> are intended for the sole use of the individual or
> organisation to whom they are addressed. If you have received
> this Email in error please notify the sender immediately and
> delete it without using, copying, storing, forwarding or
> disclosing its contents to any other person. The Council has
> endeavoured to scan this Email message and attachments for
> computer viruses and will not be liable for any losses
> incurred by the recipient.
> **********************************************************************
>
>
> ----
> To subscribe, unsubscribe, suspend, or view list archives,
> visit http://www.webaim.org/discussion/
>


----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/