Skip to content

Commit

Permalink
Replace old body with
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerkraemer committed Jan 21, 2019
1 parent d7ca161 commit 94b7c32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/Middleware/CleanHtmlMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use TYPO3\CMS\Core\Http\Stream;
use TYPO3\CMS\Core\Utility\GeneralUtility;

class CleanHtmlMiddleware implements MiddlewareInterface
Expand Down Expand Up @@ -42,7 +43,10 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
$GLOBALS['TSFE']->config['config']['sourceopt.']
);

// @todo replace old body with $processedHtml
// Replace old body with $processedHtml
$responseBody = new Stream('php://temp', 'rw');
$responseBody->write($processedHtml);
$response = $response->withBody($responseBody);
}

return $response;
Expand Down

0 comments on commit 94b7c32

Please sign in to comment.