[BUGFIX] Allow target attribute for more doctypes 15/22215/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Thu, 11 Jul 2013 13:55:33 +0000 (15:55 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 11 Jul 2013 17:38:08 +0000 (19:38 +0200)
The target attribute for links is allowed according to w3c documentation
in more doctypes than xhtml frameset and html5.

Change-Id: Id4110399dec1c1f1d0a4d69342440021837b51a9
Resolves: #37710
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/22215
Reviewed-by: Henrik Ziegenhain
Tested-by: Patrick Broens
Reviewed-by: Patrick Broens
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/frontend/Classes/Page/PageGenerator.php

index 445dfde..a157c81 100644 (file)
@@ -124,7 +124,11 @@ class PageGenerator {
                // dtdAllowsFrames indicates whether to use the target attribute in links
                $GLOBALS['TSFE']->dtdAllowsFrames = FALSE;
                if ($GLOBALS['TSFE']->config['config']['doctype']) {
-                       if (in_array((string) $GLOBALS['TSFE']->config['config']['doctype'], array('xhtml_frames', 'html5'))) {
+                       if (in_array(
+                               (string) $GLOBALS['TSFE']->config['config']['doctype'],
+                               array('xhtml_trans', 'xhtml_frames', 'xhtml_basic', 'xhtml_2', 'html5'),
+                               TRUE)
+                       ) {
                                $GLOBALS['TSFE']->dtdAllowsFrames = TRUE;
                        }
                } else {