mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Clearer escaping in CMSMain
No direct security issue, but makes intent clearer
This commit is contained in:
parent
e170f4c21b
commit
86339a551d
@ -747,13 +747,21 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
if($num) {
|
||||
return sprintf(
|
||||
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s">%s</a>',
|
||||
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 '<a class="action-detail" href="' . singleton('CMSPageEditController')->Link('show') . '/' . $item->ID . '">' . $item->TreeTitle . '</a>';
|
||||
return sprintf(
|
||||
'<a class="action-detail" href="%s/%d">%s</a>',
|
||||
singleton('CMSPageEditController')->Link('show'),
|
||||
(int)$item->ID,
|
||||
$item->TreeTitle // returns HTML, does its own escaping
|
||||
);
|
||||
}
|
||||
));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user