I am using CF8's cftextarea & rich text editor to accept some data from users. To save it in my MySQL database I use HTMLEditFormat() to escape the special characters. This works fine - the text is saved as a string with all special chars escaped.
The question is - when I read that data from the database to display it on a web page it just displays it as a string - not html formatted text.
An example would be:
<p><span style="color: rgb(255, 0, 0);">Sample Text</span></p>
When I output to my web page in cfoutput tags its displays it as a string (including the tags) - not as "Sample Text" in red type
Is there a simple way to unescape the chars or do I need to use Replace()......or is there a better way to do this?
Why are you escaping it in the first place? MySQL doesn't see mark-up as "special characters" so there's no need to escape them. It's all just text to a DB. The browser is the only thing that cares whether it's mark-up or not.