summaryrefslogtreecommitdiff
path: root/tdd-bootstrap.php
diff options
context:
space:
mode:
authorMichal Zimniewicz <michzimny@gmail.com>2018-02-03 22:49:24 +0100
committerMichal Zimniewicz <michzimny@gmail.com>2018-02-03 22:49:24 +0100
commit84dca9772cdefaf08bf46704bce3c1cc7768ebb0 (patch)
tree847f994022fdb4688d64017a3a52a68ba055dc39 /tdd-bootstrap.php
parent8f49020717fb7f33d3fd5d4264c1c419c1e65a5c (diff)
Revert "refactor deletion of http-equiv=refresh"
This reverts commit 8f49020717fb7f33d3fd5d4264c1c419c1e65a5c.
Diffstat (limited to 'tdd-bootstrap.php')
-rw-r--r--tdd-bootstrap.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/tdd-bootstrap.php b/tdd-bootstrap.php
index 255e535..79320b6 100644
--- a/tdd-bootstrap.php
+++ b/tdd-bootstrap.php
@@ -74,8 +74,7 @@ class Protocol {
$meta = $head->find('meta');
foreach ($meta as $metaTag) {
if ($metaTag->hasAttribute('http-equiv') && strtolower($metaTag->getAttribute('http-equiv')) == 'refresh') {
- $head->innertext .= '<script type="text/javascript">setTimeout(function() { location.reload(); }, ' . ($metaTag->getAttribute('content') * 1000) . ');</script>';
- $metaTag->outertext = ''; // delete $metaTag
+ $head->innertext = str_replace($metaTag->outertext, '', $head->innertext) . '<script type="text/javascript">setTimeout(function() { location.reload(); }, ' . ($metaTag->getAttribute('content') * 1000) . ');</script>';
break;
}
}