Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing " with " 1

Status
Not open for further replies.

bluesauceuk

Programmer
Jan 1, 2001
73
GB
Hello, how can I replace " and ', and other chars as & with nice versions such as " etc

here's what I have!

<cfset form.desc = replace(form.post,&quot;&quot;&quot;,&quot;&quot;&quot;>

But it don't work!
 
You need to escape the quote... which, in the case of ColdFusion, means to double it up. So the line would be:

Code:
<cfset form.desc = replace(form.post,&quot;
Code:
&quot;&quot;
Code:
&quot;,&quot;&quot;&quot;>



-Carl
 
Ack... that should be:

Code:
<cfset form.desc = replace(form.post,&quot;
Code:
&quot;&quot;
Code:
&quot;,&quot;&amp;quot;&quot;>


-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top