Skip to content

Commit 863c264

Browse files
committed
Limit toolbar to first head tag
1 parent c623121 commit 863c264

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

system/Debug/Toolbar.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,7 @@ public function prepare(RequestInterface $request = null, ResponseInterface $res
395395

396396
if (strpos($response->getBody(), '<head>') !== false)
397397
{
398-
$response->setBody(
399-
str_replace('<head>', '<head>' . $script, $response->getBody())
400-
);
401-
398+
$response->setBody(preg_replace('<head>', '<head>' . $script, $response->getBody(), 1));
402399
return;
403400
}
404401

0 commit comments

Comments
 (0)