Stir Zoltán
Stir Zoltán

Reputation: 4053

Preventing coldfusion from escaping characters

I have a standard xml which contains a string like "test & # 3 5 ; 4"(just ignore the spaces). Now when I read it with cffile.read then this string becomes "test#4". Is there any way to prevent coldfusion to encoding characters? I already tried changing the encoding on cffile.read and it didn't work.

Upvotes: 0

Views: 206

Answers (1)

NotJustClarkKent
NotJustClarkKent

Reputation: 1095

You just need to double up your hash, ie: "test & ## 3 5 ; 4" - so something like:

replace( yourstring , "##" , "####" , "all" )

Upvotes: 1

Related Questions