common PITA... I usually do a Replace(stringname, '"', """) and a Replace(string, "'", "&rsquo") assuming the " and ' are stored in the DB as " and ' respectively. Note for dumping data like this into JavaScript, escape them.
Doug >-----Original Message----- >From: Joshua Miller [mailto:[EMAIL PROTECTED] >Sent: Monday, March 10, 2003 2:27 PM >To: CF-Talk >Subject: Special Characters driving me nuts > > >Greetings, > >I've been fighting with user-input and special characters for days now, >I'm starting to get really frustrated. > >Here's the scenario: > >1. User enters data into a textarea field. This will usually contain >several special characters (?/{}[]|\">[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]&*,> >&*,<>?/{}[]|\-_+)(^) >2. I use URLEncodedFormat before sticking the data in my >database table, >so I'm storing encoded data >3. I use URLDecode when retrieving the data into an HTML page to show >the data entered. > >Here's the problem: > >Data that begins with a special character doesn't display. Data that is >surrounded by " marks doesn't display >For example: > >"This" line won't display in HTML >This line $ will display in HTML >This line "will not" display in HTML >$This line will not display in HTML > >If I use HTMLEditFormat() I still can't see the items surrounded by " >marks and it also displays the URLEncodedFormat information so space = >%20 on screen in the HTML page. > >How do I overcome this issue? > >Thanks, > >Joshua Miller >Head Programmer / IT Manager >Garrison Enterprises Inc. >www.garrisonenterprises.net <http://www.garrisonenterprises.net/> >[EMAIL PROTECTED] >(704) 569-9044 ext. 254 > >*************************************************************** >********* >************* >Any views expressed in this message are those of the individual sender, >except where the sender states them to be the views of >Garrison Enterprises Inc. > >This e-mail is intended only for the individual or entity to >which it is >addressed and contains information that is private and confidential. If >you are not the intended recipient you are hereby notified that any >dissemination, distribution or copying is strictly prohibited. If you >have received this e-mail in error please delete it immediately and >advise us by return e-mail to ><mailto:[EMAIL PROTECTED]> >[EMAIL PROTECTED] >*************************************************************** >********* >************* > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4