[BUGFIX] Use correct content type for BE ajax requests 26/50426/2
authorMarkus Klein <markus.klein@typo3.org>
Fri, 28 Oct 2016 22:14:38 +0000 (00:14 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 28 Oct 2016 22:29:37 +0000 (00:29 +0200)
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>
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php

index ed27b3e..1457ea4 100644 (file)
@@ -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');
     }
 
     /**
index 738cdb0..cf82468 100644 (file)
@@ -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;
     }