This works quite well for preventing the html tags from rendering but when i use with prettify, it displays as a massive block of code without styles. Im sure there is something conflicting, but rather, are there any alternatives that are more popular for the fix im trying to attempt?
I’m not seeing the issue you are describing, but I would think if you escaped the HTML before running prettyPrint your problems should go away.
Just to make sure you know that all syntax hilighting scripts add something like a span around bits of the code to colorize it, so it sounds like those elements are being converted by the escapeHTML script above and messing up the look.
@mottie, your absolutely correct. I was calling prettyprint() before trying to escape the html entities. Thanks for pointing that out, i totally overlooked that. Now i call that function inside my if statement and it works perfect. Thanks
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".