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

From: Date: Thu, 22 Oct 2020 08:28:30 +0000
Subject: Bug #80268 [NEW]: HTML string containing ASCII character \0 breaks DomDocument
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229848@lists.php.net to get a copy of this message
From:             marco dot marsala at live dot it
Operating system: Windows and Linux
PHP version:      7.3.23
Package:          DOM XML related
Bug Type:         Bug
Bug description:HTML string containing ASCII character \0 breaks DomDocument

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 bug report at https://bugs.php.net/bug.php?id=80268&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80268&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80268&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80268&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80268&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80268&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80268&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80268&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80268&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80268&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80268&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80268&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80268&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80268&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80268&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80268&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80268&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80268&r=mysqlcfg


Thread (4 messages)

« previous php.bugs (#229848) next »