From d9be5665e1aa3920c302519844f0d3d46fce055b Mon Sep 17 00:00:00 2001 From: Christian Seifert Date: Tue, 18 Aug 2015 20:31:19 +0000 Subject: [PATCH] [BUGFIX] Replace ###ID### in openCustomUrlInContentFrame correctly Adding an URL by getModuleUrl including an array having an ID parameter id=###ID### results in an escaped string. Instead of "###ID###" the value "%23%23%23ID%23%23%23" is submitted to the JavaScript function. This patch fixes the old replacement function. Now, you can again add click menu items linking to modules and passing the selected page uid. Resolves: #69170 Releases: master, 6.2 Change-Id: Ib4c0a1556dd1ed583e8faefe431e2d4eaaf864ad Reviewed-on: http://review.typo3.org/42733 Reviewed-by: Wouter Wolters Reviewed-by: Christian Seifert Tested-by: Christian Seifert Reviewed-by: Daniel Goerz Tested-by: Daniel Goerz Reviewed-by: Markus Klein Tested-by: Markus Klein --- .../extjs/components/pagetree/javascript/actions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js index 1dc893d542d3..305385daf549 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js @@ -732,8 +732,12 @@ TYPO3.Components.PageTree.Actions = { } node.select(); + var nodeId = node.attributes.nodeData.id, + idPattern = '###ID###'; TYPO3.Backend.ContentContainer.setUrl( - contextItem.customAttributes.contentUrl.replace('###ID###', node.attributes.nodeData.id) + contextItem.customAttributes.contentUrl + .replace(idPattern, nodeId) + .replace(encodeURIComponent(idPattern), nodeId) ); }, -- 2.20.1