Project

General

Profile

Actions

Bug #100929

closed

Typoscript config controlsList=nodownload not possible!

Added by Heiko Dietrich over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2023-05-30
Due date:
% Done:

100%

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

Description

Typoscript config not possible:

lib.contentElement.settings.media.additionalConfig.controlsList=nodownload

rendering will give 2 attributes

<video .... controlsList controlsList="nodownload"><source src="...." type="video/mp4"></video>

Reason is a doublet Foreach in \TYPO3\CMS\Core\Resource\Rendering\VideoTagRenderer::render-Method

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

        foreach (['class', 'dir', 'id', 'lang', 'style', 'title', 'accesskey', 'tabindex', 'onclick', 'controlsList', 'preload'] as $key) {
            if (!empty($options[$key])) {
                $attributes[] = $key . '="' . htmlspecialchars($options[$key]) . '"';
            }
        }
Actions

Also available in: Atom PDF