Skip to content

Commit 6400ef1

Browse files
committed
added regression test for bug #69679
DOMDocument::loadHTML refuses to accept NULL bytes.
1 parent bdf3bb6 commit 6400ef1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ext/dom/tests/bug69679.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Bug #69679 (DOMDocument::loadHTML refuses to accept NULL bytes)
3+
--FILE--
4+
<?php
5+
$doc = new DOMDocument();
6+
$html = "<!DOCTYPE html><html><head><meta charset='UTF-8'></head><body>U+0000 <span>\x0</span></body></html>";
7+
$doc->loadHTML($html);
8+
print($doc->saveHTML());
9+
?>
10+
--EXPECT--
11+
<!DOCTYPE html>
12+
<html><head><meta charset="UTF-8"></head><body>U+0000 <span></span></body></html>

0 commit comments

Comments
 (0)