Skip to content

Commit

Permalink
Merge branch 'var-dumper-regex-escaper' into hotfix/28
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Mar 21, 2020
2 parents 2fc2018 + ec745a0 commit 45ae474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Listener/ToolbarListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected function injectToolbar(ProfilerEvent $event)
$toolbarJs->setTemplate('laminas-developer-tools/toolbar/script');
$script = $this->renderer->render($toolbarJs);

$toolbar = str_replace('$', '\$', $toolbar);
$toolbar = str_replace(['$', '\\\\'], ['\$', '\\\\\\'], $toolbar);
$injected = preg_replace(
'/<\/body>(?![\s\S]*<\/body>)/i',
$toolbar . $script . "\n</body>",
Expand Down

0 comments on commit 45ae474

Please sign in to comment.