Thank You! That's something I would never of thought of ... NOW THAT's
why I love this list - so many considerate users  : ) 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Firminger
Sent: Tuesday, 8 March 2005 11:26 AM
To: [email protected]
Subject: RE: [WSG] 2 questions: antispam code & Doc type...

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-53FFD89A1D579563">Email 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
******************************************************

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

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

Reply via email to