> I have a text area that submits to a message board and sends out an
> email to subscribers.  When a user enters a # in the body of the message
> it causes an error.
>
> How do you escape # signs?
>
> Here is the code that I tried:
> <CFSET BODY= Replace(#Body#,"#","##","ALL")>
>
> Here is the error that I get:
> Error Occurred While Processing Request
>
>  Error Diagnostic Information
>
>  Just in time compilation error
>
>  Invalid parser construct found on line 99 at position 35. ColdFusion
> was looking at the following text:
>
>  "
>
>  Invalid expression format. The usual cause is an error in the
> expression structure.
>
> Does anyone know how to get around this?

You have to escape the #s within the replace

<CFSET BODY= Replace(Body,"##","####","ALL")>

And will people PLEASE read Ben's "To # or not to #"

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to