[TYPO3-core] RFC: Bug 1477 and 3013 - xhtml_cleaning corrupts javascript

Franz Holzinger franz at fholzinger.com
Thu Sep 7 18:05:13 CEST 2006


Hello Martin,

Martin Kutschker a écrit :
> Dmitry Dulepov schrieb:
> > Hi!
> > 
> > Martin Kutschker wrote:
> > 
> >> Without knowing the code of the HTML cleaner. Why look for CDATA and 
> >> not for the script element. Inside <script> nothing should be checked, 
> >> wheter enclosed by a CDATA declaration (?) or not.
> > 
> > 
> > Same for <style>. However if <script> and <style> use CDATA declaration 
> > (as they should!) patch should work.
> 
> Why should? After all its a cleaning function. So in fact xhtml_cleaning 
> should ADD it if it's missing instead of relying on its presence.

I think no TYPO3 specific code should be inserted with xhtml_cleaning.
However it is possible to write another function
'javascript_cdata_inserter' which could add those CDATA things. But the
exension author should iniitiate this by himself.

Or let's come back to one of my former RFCs which has resulted in this
code line:
$TSFE->additionalHeaderData['tx_ttproducts-xajax'] = $code;

There should be an API function which adds JavaScript and inserts the
CDATA things.

Greets,

Franz






More information about the TYPO3-team-core mailing list