[BUGFIX] Use correct content type for BE ajax requests 29/50429/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:30:00 +0000 (00:30 +0200)
Fix invalid content type in toolbar items.

Resolves: #78493
Releases: master, 7.6
Change-Id: Ie4341136a9978e1c446f3871ba44602dd7d7f53d
Reviewed-on: https://review.typo3.org/50429
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 3773a47..fb20917 100644 (file)
@@ -743,7 +743,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 8687f19..efec702 100644 (file)
@@ -259,7 +259,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;
     }