SyntaxHighlighter Invalid HTML Problem Fast Hack
SyntaxHighlighter is a nice tool that makes the code snippets on your blog look pretty. It’s based on Javascript so it’s unobtrusive and degrades gracefully. It’s client side based so it works on every server. It supports C++, Javascript, PHP, XML, CSS and the most common languages out there. It’s easy to deploy and it supports most browsers. With all those nice things said, it still does something that ruins your day. SyntaxHighlighter makes your XHTML invalid.
Why is that a problem? See this, you’ve been coding this cool design for hours, making pretty damn sure that you are using valid XHTML. And then you install a script and suddenly all the valid mark up that you’ve coded for hours becomes invalid because of a tiny tag.



