[TYPO3-core] FYI48 #10955: Output of additionalCSS not valid
Ernesto Baschny [cron IT]
ernst at cron-it.de
Mon Feb 7 13:48:05 CET 2011
Steffen Gebert schrieb am 07.02.2011 13:22:
>> But I'm not sure about the CDATA in general or especially for JS.
>
> CDATA is not related to JS, CSS or whatever. It just signals the
> XML/XHTML parser that the contents inside CDATA are "character data" and
> thus must not be interpreted and can contain whatever you want.
> As neither JS, nor CSS is (X)HTML code, surrounding it with CDATA tag is
> appropriate.
But the reason for quoting the CDATA snippet is javascript specific,
because non-XML browsers will interpret "CDATA" as a first JavaScript
command and fail.
So this is why I still think we should quote it, but we can get rid of
it complete - as it looks - in the backend, where we're talking HTML5
anyway. Remains unclear to me if this is compatible with all modern
browser that we will support in the BE in 4.6, but I guess it is.
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list