Actually I do, I was nesting them the wrong way :OS Ade
-----Original Message----- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: 14 June 2002 11:50 To: CF-Talk Subject: RE: RE: FW: RE: Quotation Hell Cheers, I thought I might be doing it wrong, but what about using the Left() function on your output, I don't see a way around this? Ade -----Original Message----- From: Justin Scott [mailto:[EMAIL PROTECTED]] Sent: 14 June 2002 11:40 To: CF-Talk Subject: Re: RE: FW: RE: Quotation Hell > I have a form which the user gets to fill in, they put into a <input > type="text"... > A quote: "To be or not to be" > > now in my insert statement I have... > INSERT INTO sometable (somecol) > VALUES ('#htmlEditFormat(form.field)#') > > which translates to.. > INSERT INTO sometable (somecol) > VALUES ('A quote: "To be or not to be"') > > this isn't what you see in the debugging on the page, but it is what gets > put into the DB, view the source to see. Why would you encode the string as it goes into the database? CF will take care of escaping any single quotes for you, so you shouldn't have to encode the string to avoid errors here. The only place htmlEditFormat() should be used in this setup would be on the form where they enter the string to begin with (as part of the value="", assuming you wrap around the form if there is an error), or the same way on an editing page, etc.. Yes, your point that it makes the string longer is valid, but it shouldn't be an issue if you use it as it was intended. -Justin Scott, Lead Developer Sceiron Internet Services, Inc. http://www.sceiron.com ______________________________________________________________________ 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 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