Are CDATA tags ever necessary in script tags and if so when?
In other words, when and where is this:
CDATA is necessary in any XML dialect, because text within an XML node is treated as a child element before being evaluated as JavaScript. This is also the reason why JSLint complains about the <
character in regexes.
References