From 8f49020717fb7f33d3fd5d4264c1c419c1e65a5c Mon Sep 17 00:00:00 2001 From: Michal Zimniewicz Date: Sat, 3 Feb 2018 22:22:58 +0100 Subject: refactor deletion of http-equiv=refresh --- tdd-bootstrap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tdd-bootstrap.php b/tdd-bootstrap.php index 79320b6..255e535 100644 --- a/tdd-bootstrap.php +++ b/tdd-bootstrap.php @@ -74,7 +74,8 @@ class Protocol { $meta = $head->find('meta'); foreach ($meta as $metaTag) { if ($metaTag->hasAttribute('http-equiv') && strtolower($metaTag->getAttribute('http-equiv')) == 'refresh') { - $head->innertext = str_replace($metaTag->outertext, '', $head->innertext) . ''; + $head->innertext .= ''; + $metaTag->outertext = ''; // delete $metaTag break; } } -- cgit v1.2.3