value="#htmlEditFormat(left(string, 20))#"

-Justin Scott, Lead Developer
 Sceiron Internet Services, Inc.
 http://www.sceiron.com


----- Original Message -----
From: "Adrian Lynch" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 6:49 AM
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: &quot;To be or not to be&quot;')
> >
> > 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
>
>
>
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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

Reply via email to