[BUGFIX] Avoid frameborder attribute if no doctype is set 17/59117/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 11 Dec 2018 12:56:05 +0000 (13:56 +0100)
committerBenni Mack <benni@typo3.org>
Sat, 22 Dec 2018 12:09:25 +0000 (13:09 +0100)
The YouTube and Vimeo renderer must also check if the doctype is not set as html5 is
the default value.

Resolve: #87114
Releases: master, 9.5
Change-Id: I0eab8e6da67ca1c073847a1a4c6203f97778c4df
Reviewed-on: https://review.typo3.org/59117
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Tested-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Resource/Rendering/VimeoRenderer.php
typo3/sysext/core/Classes/Resource/Rendering/YouTubeRenderer.php

index f92e32f..9c59dff 100644 (file)
@@ -191,9 +191,7 @@ class VimeoRenderer implements FileRendererInterface
         if ((int)$height > 0) {
             $attributes['height'] = (int)$height;
         }
-        if (isset($GLOBALS['TSFE']) &&
-            is_object($GLOBALS['TSFE']) &&
-            $GLOBALS['TSFE']->config['config']['doctype'] !== 'html5') {
+        if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE']) && (isset($GLOBALS['TSFE']->config['config']['doctype']) && $GLOBALS['TSFE']->config['config']['doctype'] !== 'html5')) {
             $attributes['frameborder'] = 0;
         }
         foreach (['class', 'dir', 'id', 'lang', 'style', 'title', 'accesskey', 'tabindex', 'onclick', 'allow'] as $key) {
index ec43fc1..209042f 100644 (file)
@@ -206,7 +206,7 @@ class YouTubeRenderer implements FileRendererInterface
         if ((int)$height > 0) {
             $attributes['height'] = (int)$height;
         }
-        if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE']) && $GLOBALS['TSFE']->config['config']['doctype'] !== 'html5') {
+        if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE']) && (isset($GLOBALS['TSFE']->config['config']['doctype']) && $GLOBALS['TSFE']->config['config']['doctype'] !== 'html5')) {
             $attributes['frameborder'] = 0;
         }
         foreach (['class', 'dir', 'id', 'lang', 'style', 'title', 'accesskey', 'tabindex', 'onclick', 'poster', 'preload', 'allow'] as $key) {