Actions
Bug #59889
closedstdWrap.addParams breaks on comments
Start date:
2014-06-26
Due date:
% Done:
80%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
In typo3\sysext\frontend\Classes\ContentObject\ContentObjectRenderer.php:addParams (line 4191 in Typo3 6.2.3, but the bug has been around since 4.5 at least), exploding the Tag works by exploding by "<". This breaks, if the first opening bracket belongs to a HTML comment.
Example:
HTML content of a content element:
<!-- begin FCE accordeon --> <div class="accordeon"> [...] </div>
applied stdWrap:
tt_content.stdWrap.addParams.id = cid tt_content.stdWrap.addParams.id.dataWrap = |{field:uid}
expected output:
<!-- begin FCE accordeon --> <div id="cid645" class="accordeon"> [...] </div>
actual output:
<!-- id="cid645" begin FCE accordeon --> <div class="accordeon"> [...] </div>
Suggested Fix: Instead of just exploding randomly, match using
preg_match('/\<[A-Za-z].*?\>/', $content)
Files
Actions