[BUGFIX] Revert UrlEncoding for GeneralUtility functions 56/58956/5
authorAnja Leichsenring <anja.leichsenring@typo3.com>
Mon, 26 Nov 2018 20:42:34 +0000 (21:42 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 7 Dec 2018 14:42:15 +0000 (15:42 +0100)
URLencoding applied to linkThisScript and linkThisUrl make
links fail that are only used and executed by Javascript.
Reverting to old behavior fixes the failure.

Change-Id: I992c9c362190bb7d4f6135bab059fd7ec058d2bb
Resolves: #87010
Relates: #83334
Releases: master
Reviewed-on: https://review.typo3.org/58956
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Joerg Kummer <typo3@enobe.de>
Tested-by: Preben Rather Sørensen <preben@rather.dk>
Tested-by: Tim Karliczek <tkarliczek@3pc.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Utility/GeneralUtility.php

index d1d7576..4819e11 100644 (file)
@@ -2620,7 +2620,8 @@ class GeneralUtility
                 unset($params[$key]);
             }
         }
-        return $parts . HttpUtility::buildQueryString($params, '?');
+        $pString = self::implodeArrayForUrl('', $params);
+        return $pString ? $parts . '?' . ltrim($pString, '&') : $parts;
     }
 
     /**
@@ -2639,8 +2640,10 @@ class GeneralUtility
             parse_str($parts['query'], $getP);
         }
         ArrayUtility::mergeRecursiveWithOverrule($getP, $getParams);
-        [$url] = explode('?', $url);
-        return $url . HttpUtility::buildQueryString($getP, '?');
+        $uP = explode('?', $url);
+        $params = self::implodeArrayForUrl('', $getP);
+        $outurl = $uP[0] . ($params ? '?' . substr($params, 1) : '');
+        return $outurl;
     }
 
     /**