Copy link to clipboard
Copied
Hi All,
I have a string named 'EMAIL_BODY' which contains the following text 'Blah blah ' blah blah' What I want to do is replace ' with '
How am I able to do this? as I think I need to escapse the & and # ?
Many thanks,
George
Well if you're using the # in CFML you'll most likely need to escape references to it by using ## instead.
<cfset EMAIL_BODY = "Blah blah &##39 blah blah">
<cfset newBODY = replace(EMAIL_BODY, "&##39", "&##39;", "ALL")>
<cfdump var="#variables#">
Copy link to clipboard
Copied
Well if you're using the # in CFML you'll most likely need to escape references to it by using ## instead.
<cfset EMAIL_BODY = "Blah blah &##39 blah blah">
<cfset newBODY = replace(EMAIL_BODY, "&##39", "&##39;", "ALL")>
<cfdump var="#variables#">