Skip to content

Commit 94332b8

Browse files
committed
Added test to cover issue paquettg#28
1 parent 326e178 commit 94332b8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/DomTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,18 @@ public function testEnforceEncoding()
257257
]);
258258
$this->assertNotEquals('<input type="submit" tabindex="0" name="submit" value="Информации" />', $dom->find('table input', 1)->outerHtml);
259259
}
260+
261+
public function testScriptCleanerScriptTag()
262+
{
263+
$dom = new Dom;
264+
$dom->load('
265+
<p>.....</p>
266+
<script>
267+
Some code ...
268+
document.write("<script src=\'some script\'><\/script>")
269+
Some code ...
270+
</script>
271+
<p>....</p>');
272+
$this->assertEquals('....', $dom->getElementsByTag('p')[1]->innerHtml);
273+
}
260274
}

0 commit comments

Comments
 (0)