Re: [WSG] 2 questions: antispam code Doc type...

2005-03-07 Thread Darren Wood
I use the following bit of code that seems to validate fine (also - 
lightweight):

script type=text/javascript
!--
emailE=('darr' + 'en' + '@' + 'webd' + 'eveloper.co.nz')
document.write('a href=mailto:' + emailE + '' + emailE + '/a')
//--
/script
HTH
D
Devendra Shrikhande wrote:
Thanks for the resource David. I will check it out.
Sorry about those CSS errors - I had worked on the file after my post and some 
errors had crept in.
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.northwestcollege.edu%2FIntl%2Fusermedium=all
¤ devendra ¤
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


RE: [WSG] 2 questions: antispam code Doc type...

2005-03-07 Thread Peter Firminger
Hi Devendra,

 Character Encoding mismatch!
 The character encoding specified in the HTTP header (utf-8)
 is different from the value in the meta element
 (iso-8859-1). I will use the value from the HTTP header
 (utf-8) for this validation.

ColdFusionMX serves a character encoding in the http header that is UTF-8 by
default (silly decision by Macromedia really). To change this put the
following CF code in your Application.cfm file (or in the document itself if
you don't use Application.cfm).

cfheader name=Content-Type value=text/html; charset=ISO-8859-1

I'm sending this to the list because it relates directly to validation of
ColdFusion applications that use anything apart from UTF-8 as a charset in
the page metadata and may help others as well.

So while I'm here I'll offer the method I use nowadays for email links. Mine
are all ColdFusion but the process should work for any decent server-side
language.

Consider setting up a database table with 3 fields. Uid, email and name and
put all the contacts you require for email links in there. Then create a
form page like /email.cfm and make the links something like:

a href=/email.cfm?uid=7F81CF11-A34F-41D5-53FFD89A1D579563Email Some
Person/a

On that form, you could query the database to get the name of the email
contact so that the user is confident they are not just on a general contact
form. Do some error trapping here to make sure that you actually have a
contact with that UID. If yes, give them a form, if no, maybe say 'Sorry no
user matches your request' and give them a generic form to contact the
general email address.

On submission of that form, use the UID to query the database and get the
email address for your CFMAIL tag (or the php/whatever equivalent). The
email address is never exposed on the pages, not even in a hidden form field
in the source, and they can't guess the UIDs to automate it.

P


**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] 2 questions: antispam code Doc type...

2005-03-07 Thread Nick Gleitzman
On 8 Mar 2005, at 11:12 AM, Darren Wood wrote:
I use the following bit of code that seems to validate fine (also - 
lightweight):

script type=text/javascript
!--
emailE=('darr' + 'en' + '@' + 'webd' + 'eveloper.co.nz')
document.write('a href=mailto:' + emailE + '' + emailE + '/a')
//--
/script
HTH
D
These and the other 'simple' javascript methods posted are *really* 
easily decoded bt spammers. Remember, they're programmers, too...

An extra level of protection can be gained by importing the javascript 
from an external, linked .js file.

Personally, I use the Enkoder at 
http://automaticlabs.com/products/enkoderform/. AFAIK, its output 
validates (just to keep this post on-topic...).

N
__
Omnivision. Websight.
http://www.omnivision.com.au/
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**