- From: <bugzilla@jessica.w3.org>
- Date: Fri, 24 May 2013 17:42:13 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20201 --- Comment #13 from Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> --- (In reply to comment #12) > [...] Tracker Issue; > > Title: Forbid usage of CDATA sections in Polyglot markup > > Text: Safe usage of CDATA sections requires them to be shielded by comments > that depends on type used for <script> element and also depends on scripts > enabled. This in turn is very complex and fragile and doesn't provide very > useful value. May be you find the following relevant: (1) It depends on the scripting language whether it is necessary to use comments. For example, though it might not pass the linting tool, JavaScript permits that one uses a string literal instead: <script> "<![CDATA["; script goes here "]]>"; </script> (2) And if <script>’s content type is an XML markup language (such as in AmpleSDK’s case), then there shouldn’t be any need to comment it out. (3) HTML4 did, per the letter, require that one escaped the backslash sharacter: <script type="text/javascript"><p>elemnet<\/p> As a result, most authors broke this tedious rule. Likewise, when CDATA is disallowed, certain <script> usage conventions becomes extremely tedious (and some become impossible). If it becomes too tedious, authors will skip the syntax rules. > [ ... ] what I meant > was not that CDATA syntax itself is complex, but ways how to comment it out > inside HTML <script> are. (4) Actually, I think the most difficult for Web authors, is to understand *why* CDATA is useful - what it does (and doesn’t) do. (5) But as for your very point, then commenting is common knowledge for Web authors - much more common knowlegde than escaping. And the C++ comments style - /*comment*/ - works in both CSS and JavaScript. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 24 May 2013 17:42:19 UTC