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 // TODO Save this item into the given relationship
$link = '<a href="' . $this->Link('edit') . '">"' // TODO Allow HTML in form messages
. htmlspecialchars($this->record->Title, ENT_QUOTES) // $link = '<a href="' . $this->Link('edit') . '">"'
. '"</a>'; // . htmlspecialchars($this->record->Title, ENT_QUOTES)
// . '"</a>';
$link = '"' . $this->record->Title . '"';
$message = _t( $message = _t(
'GridFieldDetailForm.Saved', 'GridFieldDetailForm.Saved',
'Saved {name} {link}', 'Saved {name} {link}',