diff --git a/src/VersionedGridFieldItemRequest.php b/src/VersionedGridFieldItemRequest.php index 6abec5b7..99aa354d 100644 --- a/src/VersionedGridFieldItemRequest.php +++ b/src/VersionedGridFieldItemRequest.php @@ -131,7 +131,7 @@ public function doArchive($data, $form) 'Archived {name} "{title}"', [ 'name' => $record->i18n_singular_name(), - 'title' => Convert::raw2xml($title) + 'title' => $title ] ); $this->setFormMessage($form, $message); @@ -139,7 +139,7 @@ public function doArchive($data, $form) //when an item is deleted, redirect to the parent controller $controller = $this->getToplevelController(); $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 } @@ -183,12 +183,12 @@ public function doPublish($data, $form) 'Published {type} "{title}"', [ 'type' => $record->i18n_singular_name(), - 'title' => Convert::raw2xml($record->Title) + 'title' => $record->Title ] ); $controller = $this->getToplevelController(); - $controller->getResponse()->addHeader('X-Status', $message); + $controller->getResponse()->addHeader('X-Status', rawurlencode($message)); return $this->redirectAfterSave($isNewRecord); } @@ -217,13 +217,13 @@ public function doUnpublish($data, $form) 'Unpublished {name} "{title}"', [ 'name' => $record->i18n_singular_name(), - 'title' => Convert::raw2xml($title) + 'title' => $title ] ); $this->setFormMessage($form, $message); $controller = $this->getToplevelController(); - $controller->getResponse()->addHeader('X-Status', $message); + $controller->getResponse()->addHeader('X-Status', rawurlencode($message)); // Redirect back to edit return $this->redirectAfterSave(false);