Project

General

Profile

Actions

Bug #89147

open

Media additionalConfig no-cookie attribute is added to video tags

Added by Jarvis H about 5 years ago. Updated about 2 years ago.

Status:
Under Review
Priority:
Should have
Assignee:
Category:
Fluid Styled Content
Target version:
-
Start date:
2019-09-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Description:

Typo3 version: 9.5.9

no-cookie attribute is added to <video> tags causing html validation errors

How to reproduce:

Add a media element using an mp4 video file.

Suspected cause:

The 'no-cookie' attribute is used for embedded youtube videos and is set via typoscript like this:

lib.contentElement.settings.media.additionalConfig.no-cookie = 1

which causes output like this:

<video controls no-cookie>...</video>

In the \TYPO3\CMS\Core\Resource\Rendering\VideoTagRenderer class we see that all values found in additionalConfig are added as attributes in addition to all values from additionalAttributes

if (isset($options['additionalConfig']) && is_array($options['additionalConfig'])) {
    foreach ($options['additionalConfig'] as $key => $value) {
        if ((bool)$value) {
            $attributes[] = htmlspecialchars($key);
        }
    }
}

Possible solution:

The above lines could be removed entirely, as additionalAttributes are already available.

Actions

Also available in: Atom PDF