Hi there,
What about changing the script snippet to:
<script type="text/javascript" charset="utf-8"> // <![CDATA[ $0 // ]]> </script>
This would make it more palatable under XHTML and of course, it can be modified to make the CDATA enclosures deleteable by tabbing, with a few extra pieces of TextMate code. Just a thought...