diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 8d2f96c1..860ea61d 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -747,13 +747,21 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr if($num) { return sprintf( '%s', - Controller::join_links($controller->Link(), "?ParentID={$item->ID}&view=list"), + Controller::join_links( + $controller->Link(), + sprintf("?ParentID=%d&view=list", (int)$item->ID) + ), $num ); } }, 'getTreeTitle' => function($value, &$item) use($controller) { - return '' . $item->TreeTitle . ''; + return sprintf( + '%s', + singleton('CMSPageEditController')->Link('show'), + (int)$item->ID, + $item->TreeTitle // returns HTML, does its own escaping + ); } ));