Don't link record in GridField form message

This is no longer allows through Form->sessionMessage() to avoid XSS.
This commit is contained in:
Ingo Schommer 2013-09-30 23:55:32 +02:00
parent 298de5a67d
commit deadc154ca

View File

@ -508,9 +508,11 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
// TODO Save this item into the given relationship
$link = '<a href="' . $this->Link('edit') . '">"'
. htmlspecialchars($this->record->Title, ENT_QUOTES)
. '"</a>';
// TODO Allow HTML in form messages
// $link = '<a href="' . $this->Link('edit') . '">"'
// . htmlspecialchars($this->record->Title, ENT_QUOTES)
// . '"</a>';
$link = '"' . $this->record->Title . '"';
$message = _t(
'GridFieldDetailForm.Saved',
'Saved {name} {link}',