I think I've seen somewhere how you can output the actual code instead of rendering it with coldfusion but can't seem to find it. Is this possible?
Output actual HTML
Page 1 of 12 Replies - 1104 Views - Last Post: 21 July 2010 - 08:36 AM
Replies To: Output actual HTML
#2
Re: Output actual HTML
Posted 21 July 2010 - 06:22 AM
Well, the trick is that HTML doesn't get rendered by the Coldfusion engine at all. HTML output to a browser has the browser interpreting the HTML tags and rendering them.
In order to get around that you'll want to replace the left and right greater than/less than signs (sorry, I don't recall the proper names for those characters) with their ASCII equivalents. That is, for "<" you'd use "<" for ">" you'd use ">". What you'll use CF for is to build a function that you can call and pass a string to that will parse through the passed string replacing the lesser and greater than signs with their ASCII equivalents and pass back the edited string for you to display.
I believe this function found on CFLib.org does it all for you.
Good luck!
In order to get around that you'll want to replace the left and right greater than/less than signs (sorry, I don't recall the proper names for those characters) with their ASCII equivalents. That is, for "<" you'd use "<" for ">" you'd use ">". What you'll use CF for is to build a function that you can call and pass a string to that will parse through the passed string replacing the lesser and greater than signs with their ASCII equivalents and pass back the edited string for you to display.
I believe this function found on CFLib.org does it all for you.
Good luck!
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|