From 9959ef63f276ca9cc4ed93c76a355baa21f2ae93 Mon Sep 17 00:00:00 2001 From: Colin Tucker Date: Tue, 10 Jan 2017 15:41:26 +1100 Subject: [PATCH] Fix double-escaped ampersands in CMSMain_TreeView and CMSMain::LinkPageAdd --- code/Controllers/CMSMain.php | 2 +- .../SilverStripe/CMS/Controllers/Includes/CMSMain_TreeView.ss | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index 70c1db58..e19dbac4 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -339,7 +339,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr } if($placeholders) { - $link .= (strpos($link, '?') === false ? "?$placeholders" : "&$placeholders"); + $link .= (strpos($link, '?') === false ? "?$placeholders" : "&$placeholders"); } return $link; diff --git a/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeView.ss b/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeView.ss index 001358e4..02b9f796 100644 --- a/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeView.ss +++ b/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeView.ss @@ -17,7 +17,7 @@ $ExtraTreeTools data-url-tree="$LinkWithSearch($Link(getsubtree)).ATT" data-url-savetreenode="$Link(savetreenode).ATT" data-url-updatetreenodes="$Link(updatetreenodes).ATT" - data-url-addpage="{$LinkPageAdd('AddForm/?action_doAdd=1', 'ParentID=%s&PageType=%s').ATT}" + data-url-addpage="{$LinkPageAdd('AddForm/?action_doAdd=1', 'ParentID=%s&PageType=%s').ATT}" data-url-editpage="$LinkPageEdit('%s').ATT" data-url-duplicate="{$Link('duplicate/%s').ATT}" data-url-duplicatewithchildren="{$Link('duplicatewithchildren/%s').ATT}" @@ -35,7 +35,7 @@ $ExtraTreeTools data-url-tree="$LinkWithSearch($Link(getsubtree)).ATT" data-url-savetreenode="$Link(savetreenode).ATT" data-url-updatetreenodes="$Link(updatetreenodes).ATT" - data-url-addpage="{$LinkPageAdd('AddForm/?action_doAdd=1', 'ParentID=%s&PageType=%s').ATT}" + data-url-addpage="{$LinkPageAdd('AddForm/?action_doAdd=1', 'ParentID=%s&PageType=%s').ATT}" data-url-editpage="$LinkPageEdit('%s').ATT" data-url-duplicate="{$Link('duplicate/%s').ATT}" data-url-duplicatewithchildren="{$Link('duplicatewithchildren/%s').ATT}"