From 19ee6261fe3d2c8b7e92e0d18640f6d7de442023 Mon Sep 17 00:00:00 2001 From: Markus Klein <markus.klein@typo3.org> Date: Sat, 29 Oct 2016 00:14:38 +0200 Subject: [PATCH] [BUGFIX] Use correct content type for BE ajax requests Fix invalid content type in toolbar items. Resolves: #78493 Releases: master, 7.6 Change-Id: Ie4341136a9978e1c446f3871ba44602dd7d7f53d Reviewed-on: https://review.typo3.org/50426 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Andreas Fernandez <typo3@scripting-base.de> Tested-by: Andreas Fernandez <typo3@scripting-base.de> --- .../Classes/Backend/ToolbarItems/ShortcutToolbarItem.php | 2 +- .../Classes/Backend/ToolbarItems/OpendocsToolbarItem.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php index ed27b3e94fcf..1457ea49a23d 100644 --- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php +++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php @@ -793,7 +793,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface } else { $response->getBody()->write('failed'); } - return $response->withHeader('Content-Type', 'html'); + return $response->withHeader('Content-Type', 'text/html; charset=utf-8'); } /** diff --git a/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php b/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php index 738cdb07e03c..cf8246804f80 100644 --- a/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php +++ b/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php @@ -286,7 +286,7 @@ class OpendocsToolbarItem implements ToolbarItemInterface public function renderMenu(ServerRequestInterface $request, ResponseInterface $response) { $response->getBody()->write($this->getDropDown()); - $response = $response->withHeader('Content-Type', 'html'); + $response = $response->withHeader('Content-Type', 'text/html; charset=utf-8'); return $response; } -- GitLab