fix: </head> tag being removed

This commit is contained in:
Antoni Siek
2023-06-06 19:15:11 +02:00
committed by KHOUBZA Younes
parent b37fe49e4c
commit 32460e451a
+2 -1
View File
@@ -61,8 +61,9 @@ final class ResponseExtension
}
$htmlResponse = "\n".str_replace("\n", '', $htmlResponse)."\n";
$offset = $alreadyRendered ? strlen(HtmlPresenter::FLASHER_FLASH_BAG_PLACE_HOLDER) : 0;
$content = substr($content, 0, $insertPosition).$htmlResponse.substr($content, $insertPosition);
$content = substr($content, 0, $insertPosition).$htmlResponse.substr($content, $insertPosition + $offset);
$response->setContent($content);
return $response;