Bug #80268 [PATCH]: HTML string containing ASCII character \0 breaks DomDocument

From: Date: Thu, 22 Oct 2020 09:43:51 +0000
Subject: Bug #80268 [PATCH]: HTML string containing ASCII character \0 breaks DomDocument
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229853@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
 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)

« previous php.bugs (#229853) next »