When is a CDATA section necessary within a script tag?

后端 未结 15 2561
时光说笑
时光说笑 2020-11-21 22:37

Are CDATA tags ever necessary in script tags and if so when?

In other words, when and where is this:



        
15条回答
  •  庸人自扰
    2020-11-21 23:13

    When you are going for strict XHTML compliance, you need the CDATA so less than and ampersands are not flagged as invalid characters.

提交回复
热议问题