Is it possible to use CDATA inside <pre> tag.
- by Alexander Pogrebnyak
I want to display an exception trace in the HTML page.
One way to do this is to escape HTML special characters in the exception trace and dump it inside the <pre> tag.
Although it works, it's terribly inefficient. I thought that one approach would be to wrap the trace with CDATA. I've tried it, but nothing get's displayed.
My question, can this be done?
Here is my feeble attempt.
<pre><![CDATA[blah, blah, blah with <>
and blah blah blah with &
and more blah, blah]]></pre>