This is one of those really annoying pieces of syntax that I can never remember and that I always have to look up so I figured that other people would surely have the same issue :)
Anyway, see below for how to write CDATA comments in your JavaScript to make it XHTML compliant.