or in the source code. u have to encode them into <span> else when ur html is shown in browser, it is very likely to be fucked up.
so, i think at this point, we conclude, that any < > chars in source code, must be ampersand encoded. something like that. actually, this is not a conclusion. It is exactly this issue, that this whole thread, is about, that i'm thinking about, trying to analize and hope to have a clear understand and when and when not the source code must or don't have to encode the < > chars, and or &.
this is the heart of the problem of this thread.
so far, our conclusion is just that, u cannot never encode those < >, because of heredoc, and or in general any source code that does text processing of html.
if the source code is html, xml, or code to process html, xml, then, u absolutely have to encode at least the < and > chars in it.
gah. this gets back our original decision problem. naively, we think using js to syntax coloring it lets us not have to diddle source code and source code remain readable and can run as is. but now, apparently, not so. when the source code is html xml or deal with them.
jesssus. one mega problem.
btw, i have spend months dealing with these issues and investigating the google code syntax color js back in 2007 or so.
http://xahlee.info/js/google-code-prettify/index.html