The solution is simple, it only requires the script be wrapped within a CDATA marked section.
That's what I thought Papabaer but then I found this:
Unfortunately, most browsers do not support CDATA sections (the standard XML method for including text containing special characters) so the safest option is to move your client-side scripts out to separate files and include them using the script element's src attribute.
I have a keen interest in knowing what other browsers recognize CDATA as well. For now I can provide only a few that do for sure, and maybe when people start using this tag in their sites a bit more they can add on...