[TYPO3-core] FYI48: #12899: Wrong usage of CDATA raise javascript error

Martin Kutschker masi-no at spam-typo3.org
Thu Dec 3 13:11:15 CET 2009


Ernesto Baschny [cron IT] schrieb:
> Steffen Kamper schrieb:
> 
>> This is an SVN patch request.
>>
>> Type: bugfix
>>
>> BT reference: http://bugs.typo3.org/view.php?id=12899
>>
>> Branches: trunk, 4_3
>>
>> in t3lib_tsStyleConfig::ext_getForm the CDATA is
>> * not commented out which raise a javascript error
>> * have wrong closing tag
>>
>> This javascript tag is used in EM with info view of extension.
> 
> Which browser will rise this error? Commenting it out the way you did
> it: won't this make it non-xhtml anymore?
> 
> As far as I researched, the best way to escape the cdata without caring
> about "legacy browser" that don't interpret javascript at all is:
> 
> starting line: <!--//--><![CDATA[
> ending line: //]]>
> 
> See [1] for a "full explanation".

Which browser supported by the BE doesn't know about a script tag and doesn't recognize CDATA?

Steffen's version looks ok to me, so maybe it's more usual use the single line comment:

// <![CDATA[
// ]]>

Masi


More information about the TYPO3-team-core mailing list