diff options
-rw-r--r-- | ext/dom/tests/bug69679.phpt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/dom/tests/bug69679.phpt b/ext/dom/tests/bug69679.phpt new file mode 100644 index 0000000000..fc6db8d056 --- /dev/null +++ b/ext/dom/tests/bug69679.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #69679 (DOMDocument::loadHTML refuses to accept NULL bytes) +--FILE-- +<?php +$doc = new DOMDocument(); +$html = "<!DOCTYPE html><html><head><meta charset='UTF-8'></head><body>U+0000 <span>\x0</span></body></html>"; +$doc->loadHTML($html); +print($doc->saveHTML()); +?> +--EXPECT-- +<!DOCTYPE html> +<html><head><meta charset="UTF-8"></head><body>U+0000 <span></span></body></html> |