Bug #80268 [Ver->Csd]: HTML string containing ASCII character \0 breaks DomDocument

From: Date: Mon, 26 Oct 2020 12:16:02 +0000
Subject: Bug #80268 [Ver->Csd]: HTML string containing ASCII character \0 breaks DomDocument
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229927@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80268&edit=1

 ID:                 80268
 Updated by:         cmb@php.net
 Reported by:        marco dot marsala at live dot it
 Summary:            HTML string containing ASCII character \0 breaks
                     DomDocument
-Status:             Verified
+Status:             Closed
 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:

Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6d2bc7253018baa57487f622e706b8962c16d148
Log: Fix #80268: loadHTML() truncates at NUL bytes


Previous Comments:
------------------------------------------------------------------------
[2020-10-22 09:43:51] cmb@php.net

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

------------------------------------------------------------------------
[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)

« previous php.bugs (#229927) next »