#59889stdWrap.addParams breaks on comments
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)