Skip to content

Commit 0127b9e

Browse files
committed
fixes paquettg#188
1 parent 924a594 commit 0127b9e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/DomTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,4 +617,16 @@ public function testFindAttributeInBothParentAndChild()
617617
$nodes = $dom->find('[attribute]');
618618
$this->assertCount(2, $nodes);
619619
}
620+
621+
public function testLessThanCharacterInJavascript()
622+
{
623+
$results = (new Dom())->load('<html><head><script type="text/javascript">
624+
console.log(1 < 3);
625+
</script></head><body><div id="panel"></div></body></html>',
626+
[
627+
'cleanupInput' => false,
628+
'removeScripts' => false
629+
])->find('body');
630+
$this->assertCount(1, $results);
631+
}
620632
}

0 commit comments

Comments
 (0)