why don't you use the urlencodedformat() before serializing the data. this will take care of any quotes, double quote, pound signs, or any other character that might cause a problem. then use the urldecode() to convert it back.
second time Anthony Petruzzi Webmaster 954-321-4703 [EMAIL PROTECTED] http://www.sheriff.org -----Original Message----- From: Brad Roberts [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 1:18 PM To: CF-Talk Subject: RE: WDDX Breaking Hidden Field XMLFormat() turns single quotes into "'". Help? > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 26, 2002 11:43 AM > To: [EMAIL PROTECTED] > Subject: RE: WDDX Breaking Hidden Field > > > XMLFormat() > > = = = Original message = = = > > Thanks. > > Yeah, I've heard of it (and used it), I was just using it in > the wrong > place. I was trying to use it when serializing the data to wddx, > not on the > hidden field value, where it should've been. > > Another Related Question: I'm now getting errors "Not well formed" > because > of special characters like a registered mark ~. Is there a function > to deal > with these rather than using regex? If not, does anyone have > a regex to > replace all characters like this? I'm sure this isn't the only > character > that will cause problems. > > > -----Original Message----- > > From: Kwang Suh [mailto:[EMAIL PROTECTED]] > > Sent: Friday, April 26, 2002 10:42 AM > > To: CF-Talk > > Subject: RE: WDDX Breaking Hidden Field > > > > > > htmlEditFormat() the packet. > > > > <input type="hidden" name="hiddenfield" > > value="#htmlEditFormat(myWDDXPacket)#"> > > > > Does absolutely no one know about this function? > > > > -----Original Message----- > > From: Brad Roberts [mailto:[EMAIL PROTECTED]] > > Sent: Friday, April 26, 2002 8:19 AM > > To: CF-Talk > > Subject: WDDX Breaking Hidden Field > > > > > > I know this has been asked before, but I can't find it anywhere. > > > > I have a textarea that allows users to type a bunch of text. > When > > submitted, the form variables serialized to wddx and put in > a hidden field > > for the next form. > > > > The problem is that if the user enters characters like double > quotes, the > > browser thinks the hidden form field ends at the double quotes > > and displays > > the rest of the packet. > > > > What function do I need to use to "make it safe" while passing > it in a > > hidden field and then "make it normal" when I input the info > into the > > database? > > > > I've tried xmlFormat(), but it didn't work (I may not be using > it > > correctly). > > > > -Brad > > > > > > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists