mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX add missing rawurlencode (#11105)
This commit is contained in:
parent
9c4266c8f3
commit
b56e771ed5
@ -541,12 +541,12 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
|||||||
'Saved {type} "{title}" successfully.',
|
'Saved {type} "{title}" successfully.',
|
||||||
[
|
[
|
||||||
'type' => $this->record->i18n_singular_name(),
|
'type' => $this->record->i18n_singular_name(),
|
||||||
'title' => Convert::raw2xml($this->record->Title)
|
'title' => $this->record->Title
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$controller = $this->getToplevelController();
|
$controller = $this->getToplevelController();
|
||||||
$controller->getResponse()->addHeader('X-Status', $message);
|
$controller->getResponse()->addHeader('X-Status', rawurlencode($message));
|
||||||
|
|
||||||
// Redirect after save
|
// Redirect after save
|
||||||
return $this->redirectAfterSave($isNewRecord);
|
return $this->redirectAfterSave($isNewRecord);
|
||||||
@ -779,7 +779,6 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
|||||||
*/
|
*/
|
||||||
public function doDelete($data, $form)
|
public function doDelete($data, $form)
|
||||||
{
|
{
|
||||||
$title = $this->record->Title;
|
|
||||||
if (!$this->record->canDelete()) {
|
if (!$this->record->canDelete()) {
|
||||||
throw new ValidationException(
|
throw new ValidationException(
|
||||||
_t('SilverStripe\\Forms\\GridField\\GridFieldDetailForm.DeletePermissionsFailure', "No delete permissions")
|
_t('SilverStripe\\Forms\\GridField\\GridFieldDetailForm.DeletePermissionsFailure', "No delete permissions")
|
||||||
@ -792,7 +791,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
|||||||
'Deleted {type} "{name}"',
|
'Deleted {type} "{name}"',
|
||||||
[
|
[
|
||||||
'type' => $this->record->i18n_singular_name(),
|
'type' => $this->record->i18n_singular_name(),
|
||||||
'name' => htmlspecialchars($title ?? '', ENT_QUOTES)
|
'name' => $this->record->Title
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -807,7 +806,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
|||||||
//when an item is deleted, redirect to the parent controller
|
//when an item is deleted, redirect to the parent controller
|
||||||
$controller = $this->getToplevelController();
|
$controller = $this->getToplevelController();
|
||||||
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
|
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
|
||||||
$controller->getResponse()->addHeader('X-Status', $message);
|
$controller->getResponse()->addHeader('X-Status', rawurlencode($message));
|
||||||
|
|
||||||
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
|
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user