Bug #95714
openOmit attributes with blank values for additionalAttributes in VideoTagRenderer
0%
Description
VideoTagRenderer.php implodes attributes with $dontOmitBlankAttribs = true
.
$attributes[] = GeneralUtility::implodeAttributes($options['additionalAttributes'], true, true);
This could create problems like in this use case:
Example:
<f:media ... additionalAttributes="{poster: '{v:media.exists(file: \'fileadmin/test.jpg\', then: \'/fileadmin/test.jpg\')}', no-cookie: 1, relatedVideos: 0, color: 'white', playsinline: '1'}" />
In this case, AFAIK, it's not possible to omit the attribute 'poster' in Fluid. So, if file doesn't exist the attribute will still be present with an empty value but the use case wants that if a poster is not available for the video then the attribute must not be present.
I don't know if there are use cases that needs $dontOmitBlankAttribs = true
but I think that it should be false.
Updated by Oliver Hader about 3 years ago
Introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/53488/, issue #81741
(it probably affects some more classes, not only VideoTagRenderer
)
Updated by Oliver Hader about 3 years ago
- Related to Bug #81741: MediaViewHelper does not pass additionalAttributes and data to renderer instance added
Updated by Gerrit Code Review 5 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84625
Updated by Gerrit Code Review 5 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84625
Updated by Gerrit Code Review about 1 month ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84625