[BUGFIX] Use URI of request for „Open in new window“ 70/56370/5
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 19 Mar 2018 19:40:29 +0000 (20:40 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 5 Apr 2018 10:48:35 +0000 (12:48 +0200)
Resolves: #84487
Related: #84195
Releases: master
Change-Id: I2976ea291319893b25a537715e2effbbef50ef81
Reviewed-on: https://review.typo3.org/56370
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stephan Großberndt <stephan.grossberndt@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index bdbcc45..923c5ce 100644 (file)
@@ -1644,9 +1644,11 @@ class EditDocumentController
 
         $closeUrl = $this->getCloseUrl();
         if ($this->returnUrl !== $closeUrl) {
-            $scriptName = $request->getAttribute('normalizedParams')->getScriptName();
+            $requestUri = GeneralUtility::linkThisScript([
+                'returnUrl' => $closeUrl,
+            ]);
             $aOnClick = 'vHWin=window.open('
-                . GeneralUtility::quoteJSvalue($scriptName . '?returnUrl=' . $closeUrl) . ','
+                . GeneralUtility::quoteJSvalue($requestUri) . ','
                 . GeneralUtility::quoteJSvalue(md5($this->R_URI))
                 . ',\'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
             $openInNewWindowButton = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar()