[BUGFIX] JSwindow-typolink URLs are encoded twice
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 30 Jul 2011 11:10:39 +0000 (13:10 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 30 Jul 2011 20:23:39 +0000 (22:23 +0200)
In #28189 a bug was introduced for JSwindow-typolink URLs.
Because t3lib_div::quoteJSvalue is called without second paramter,
the value passed to it will also be encoded with htmlspecialchars()
which is then done a second time when putting the link together.

Change the t3lib_div::quoteJSvalue call to not encode
the result with htmlspecailchars()

Resolves: #28536
Related: #28189

Releases: 4.3, 4.4, 4.5, 4.6

Change-Id: If6bcad4d2bf1e0a4b3f5a6f04e4718df8e4e7150
Reviewed-on: http://review.typo3.org/3913
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/cms/tslib/class.tslib_content.php

index d8c01d9..7f22d5f 100644 (file)
@@ -5902,7 +5902,7 @@ class tslib_cObj {
                                        $target = '';
                                }
 
-                               $onClick = "vHWin=window.open(" . t3lib_div::quoteJSvalue($GLOBALS['TSFE']->baseUrlWrap($finalTagParts['url'])) .
+                               $onClick = "vHWin=window.open(" . t3lib_div::quoteJSvalue($GLOBALS['TSFE']->baseUrlWrap($finalTagParts['url']), TRUE) .
                                        ",'FEopenLink','" . $JSwindowParams . "');vHWin.focus();return false;";
                                $res = '<a href="' . htmlspecialchars($finalTagParts['url']) . '"' .
                                        $target . ' onclick="' . htmlspecialchars($onClick) . '"' .