xref: /PHP-8.1/ext/dom/tests/bug69679.phpt (revision bd9f4fa6)
1--TEST--
2Bug #69679 (DOMDocument::loadHTML refuses to accept NULL bytes)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$doc = new DOMDocument();
8$html = "<!DOCTYPE html><html><head><meta charset='UTF-8'></head><body>U+0000 <span>\x0</span></body></html>";
9$doc->loadHTML($html);
10print($doc->saveHTML());
11?>
12--EXPECT--
13<!DOCTYPE html>
14<html><head><meta charset="UTF-8"></head><body>U+0000 <span></span></body></html>
15