Skip to content

Commit

Permalink
[BUGFIX] Avoid frameborder attribute if no doctype is set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
georgringer authored and bmack committed Dec 22, 2018
1 parent 0025ded commit c154610
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ function (&$value, $key) use (&$attributes) {
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function collectIframeAttributes($width, $height, array $options)
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) {
Expand Down

0 comments on commit c154610

Please sign in to comment.