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

Franz Holzinger franz at fholzinger.com
Wed Sep 6 13:12:42 CEST 2006


Hi!

This is a SVN patch request.

Branch: trunk / TYPO3_4-0

Problem: When JavaScript is added to an extension via '$TSFE->setJS
($JSfieldname, $code);' then this will also go through the htmlcleaner.
Unfortunately the HtmlCleaner modfies the JavaScript code which it
shouldn't. 
Precisely: It considers '<' inside of JavaScript as the beginning of a
HTML tag and htmlencodes JavaScript code.

http://bugs.typo3.org/view.php?id=1477
"HTMLcleaner wrongly cleans JavaScript" on developer list.

Solution: Add an additional check for CDATA parts and do not change the
parts inside of it any more in the main loop.

Test: Use e.g. the category list view with configured select boxes of
tt_products.


Greets,

Franz



-------------- next part --------------
A non-text attachment was scrubbed...
Name: parsehtml-2.diff
Type: text/x-patch
Size: 1666 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060906/cc69892c/attachment.bin 


More information about the TYPO3-team-core mailing list