[BUGFIX] Fix menu popup for all IE versions 27/23227/3
authorAlexander Opitz <opitz.alexander@googlemail.com>
Wed, 21 Aug 2013 15:09:23 +0000 (17:09 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 11 Nov 2013 20:15:30 +0000 (21:15 +0100)
The IE has problems with base URLs in JS on window.open()
function calls. This problem was already fixed for content
objects but not for the menu.

This change adds the baseUrlWrap and also the quoteJSvalue
function call like in ContentObjectRenderer::typoLink().

Resolves: #22136
Releases: 6.2, 6.1, 6.0, 4.5
Change-Id: Ia1ad859d2acb358378bc4ffa3f6a9162b3fc6937
Reviewed-on: https://review.typo3.org/23227
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Stefan Neufeind
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index 8fd9d37..3216bd2 100644 (file)
@@ -1326,7 +1326,9 @@ class AbstractMenuContentObject {
                        // Open in popup window?
                        if ($matches[3] && $matches[4]) {
                                $JSparamWH = 'width=' . $matches[3] . ',height=' . $matches[4] . ($matches[5] ? ',' . substr($matches[5], 1) : '');
-                               $onClick = 'vHWin=window.open(\'' . $LD['totalURL'] . '\',\'FEopenLink\',\'' . $JSparamWH . '\');vHWin.focus();return false;';
+                               $onClick = 'vHWin=window.open('
+                                       . GeneralUtility::quoteJSvalue($GLOBALS['TSFE']->baseUrlWrap($LD['totalURL']))
+                                       . ',\'FEopenLink\',\'' . $JSparamWH . '\');vHWin.focus();return false;';
                                $LD['target'] = '';
                        }
                }