[BUGFIX] Make JS url encoding utf aware 44/55144/2
authorMarkus Klein <markus.klein@typo3.org>
Mon, 18 Dec 2017 09:32:39 +0000 (10:32 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Mon, 18 Dec 2017 10:11:41 +0000 (11:11 +0100)
Replace the deprecated function JS `escape` with `encodeURIComponent`.

Releases: master, 8.7
Resolves: #83341
Change-Id: Ia9fdd44c7b06f63ab867f692e07193ab23f535a3
Reviewed-on: https://review.typo3.org/55144
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Daniel Huf <huf.daniel@gmail.com>
Tested-by: Daniel Huf <huf.daniel@gmail.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Resources/Public/JavaScript/backend.js

index 5bc8648..42e9417 100644 (file)
@@ -36,7 +36,7 @@ function jump(url, modName, mainModName, pageId) {
  * Function similar to PHPs  rawurlencode();
  */
 function rawurlencode(str) {
-       var output = escape(str);
+       var output = encodeURIComponent(str);
        output = str_replace("*","%2A", output);
        output = str_replace("+","%2B", output);
        output = str_replace("/","%2F", output);