Is it possible to use CDATA inside <pre> tag.
Posted
by Alexander Pogrebnyak
on Stack Overflow
See other posts from Stack Overflow
or by Alexander Pogrebnyak
Published on 2010-04-30T18:34:24Z
Indexed on
2010/04/30
18:37 UTC
Read the original article
Hit count: 453
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>
© Stack Overflow or respective owner