Maybe this case doesn't occur to often, but if localizing the calendar texts and setting any text to "</script>", there will be a script error.
The only thing I can see that may be wrong in the output is that the slash should be replaced with "\/". The funny thing is that if typing any other text than "script" seems ok. Both IE9 and Firefox 4 reports this scripting error:
unterminated string literal