mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX Escaping in "dependent pages" (SS-2013-009)
This commit is contained in:
parent
a5d9958f8c
commit
ec9c15917d
@ -1850,8 +1850,20 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$dependentTable->getConfig()->getComponentByType('GridFieldDataColumns')
|
||||
->setDisplayFields($dependentColumns)
|
||||
->setFieldFormatting(array(
|
||||
'Title' => '<a href=\"admin/pages/edit/show/$ID\">$Title</a>',
|
||||
'AbsoluteLink' => '<a href=\"$value\">$value</a>',
|
||||
'Title' => function($value, &$item) {
|
||||
return sprintf(
|
||||
'<a href=\"admin/pages/edit/show/%d\">%s</a>',
|
||||
(int)$item->ID,
|
||||
Convert::raw2xml($item->Title)
|
||||
);
|
||||
},
|
||||
'AbsoluteLink' => function($value, &$item) {
|
||||
return sprintf(
|
||||
'<a href=\"%s\">%s</a>',
|
||||
Convert::raw2xml($value),
|
||||
Convert::raw2xml($value)
|
||||
);
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user