com php-src: added regression test for bug #69679: ext/dom/tests/bug69679.phpt
| From: | Christoph Michael Becker | Date: | Fri, 26 Jun 2015 23:08:56 +0000 |
| Subject: | com php-src: added regression test for bug #69679: ext/dom/tests/bug69679.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87551@lists.php.net to get a copy of this message | ||
Commit: 6400ef192c7c50faf47e958141aac8142a1cef99
Author: Christoph M. Becker <cmb@php.net> Sat, 27 Jun 2015 01:08:56 +0200
Parents: bdf3bb668f9b82a2392f8331357ffe3953146cbc
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6400ef192c7c50faf47e958141aac8142a1cef99
Log:
added regression test for bug #69679
DOMDocument::loadHTML refuses to accept NULL bytes.
Bugs:
https://bugs.php.net/69679
Changed paths:
A ext/dom/tests/bug69679.phpt
Diff:
diff --git a/ext/dom/tests/bug69679.phpt b/ext/dom/tests/bug69679.phpt
new file mode 100644
index 0000000..fc6db8d
--- /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>