CDATA being added automatically on JS in Yii?

2019-07-29 22:16发布

问题:

I am coding in Yii and whenever I put any JS it tags it in CDATA.

Why is it getting added automatically? and will there be any problem if I remove it as I write my markup in HTML5.

回答1:

Like what arnaud said in the comment if the question, it wont affect your html 5 code. So its okay.

In addition, cdata tags are quite necessary to be used for scripts in XML, so its actually a feature from Yii.