In HTML, the content type between the <script> tags is treated as CDATA which means that entities enclosed within it will not be parsed.
In XHTML, the content between the <script> tags is treated as #PCDATA which means that it will be parsed. So, to avoid having to encode the data between the tags we enclose it in a CDATA section.
The end result is that the page will validate as XHTML and will still work in older browsers.
Note: In either case, we no longer use the deprecated “language” attribute.