views:

126

answers:

1

I am trying to return html from

<cfsavecontent variables="html">
 <p>Some html</p>
</cfsavecontent>
<cfreturn html>

But when it comes back from the function the html is encoded

I found this thread http://www.coldfusionjedi.com/forums/messages.cfm?threadid=BB31B124-19B9-E658-9D3F5726B8607FD8 which has some solutions but im hoping for something a little less messy. Any help is appreciated!

Thanks

+3  A: 

try returnformat="plain" in your remote <cffunction>.

ColdFusion does not escape HTML automatically. HtmlEditFormat() is the function that does that.

However, if you <cfdump> the string, then the string will be escaped so that you can see the string in your browser.

Henry
cr1ms0n3cho
that did the trick!
cr1ms0n3cho
You gotta provide the key details (i.e. it's a remote cffunction) next time... I had to guess it 'cause you said something about innerHTML in the comment. :)
Henry
FYI cfsavecontent works too when i say that returnformat="plain" in the remote function. Thanks again for all the help :)
cr1ms0n3cho