17
I want to inline scripts or CSSs into XHTML without escaping special characters.
I can do that using a CDATA marked section.
According to http://www.w3.org/TR/xhtml1/#h-4.8 the CDATA section can be defined as:
<script type="text/javascript">
<![CDATA[
... unescaped script content ...
]]>
</script>
Then, according to http://www.w3schools.com/TAGS/tag_script.asp, the CDATA can look like:
<script type="text/javascript"><![CDATA[
// some code
//]]></script>
Which method for closing the CDATA section is better? ]]> or //]]> ?