diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php
index 86cedb15..68c0b0d9 100644
--- a/code/controllers/CMSMain.php
+++ b/code/controllers/CMSMain.php
@@ -783,13 +783,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
+ );
}
));