Bug #80268 [PATCH]: HTML string containing ASCII character \0 breaks DomDocument
Edit report at https://bugs.php.net/bug.php?id=80268&edit=1
ID: 80268
Patch added by: cmb@php.net
Reported by: marco dot marsala at live dot it
Summary: HTML string containing ASCII character \0 breaks
DomDocument
Status: Verified
Type: Bug
Package: DOM XML related
Operating System: Windows and Linux
PHP Version: 7.3.23
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Fix #80268: loadHTML() truncates at NUL bytes
On GitHub: https://github.com/php/php-src/pull/6368
Patch: https://github.com/php/php-src/pull/6368.patch
Previous Comments:
------------------------------------------------------------------------
[2020-10-22 08:28:30] marco dot marsala at live dot it
Description:
------------
HTML string containing ASCII character \0 breaks DomDocument.
Test script:
---------------
$dom = new DomDocument;
$dom->loadHTML(file_get_contents('http://thenetworksolution.it/a.htm'));
echo $dom->saveHtml();
Expected result:
----------------
the whole DOM
Actual result:
--------------
DOM is truncated after the NUL character
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80268&edit=1
Thread (4 messages)