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

From: Date: Thu, 22 Oct 2020 09:11:53 +0000
Subject: Bug #80268 [Opn->Ver]: HTML string containing ASCII character \0 breaks DomDocument
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229852@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:             Open
+Status:             Verified
 Type:               Bug
 Package:            DOM XML related
 Operating System:   Windows and Linux
 PHP Version:        7.3.23
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N



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 (#229852) next »