Bug #78129 [Asn]: DOMDocument removes whitespace between nodes

From: Date: Sun, 14 Jun 2020 20:58:05 +0000
Subject: Bug #78129 [Asn]: DOMDocument removes whitespace between nodes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227480@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78129&edit=1 ID: 78129 Updated by: cmb@php.net Reported by: nospam at unclassified dot de Summary: DOMDocument removes whitespace between nodes Status: Assigned Type: Bug Package: DOM XML related Operating System: Linux PHP Version: 7.3.6 Assigned To: cmb Block user comment: N Private report: N New Comment: You can check which version is used by PHP with phpinfo(). Ubuntu 20.04 should have libxml 2.9.10 which would be the latest version where this issue likely has been fixed. Previous Comments: ------------------------------------------------------------------------ [2020-06-14 17:42:24] nospam at unclassified dot de I'm not sure which version I have. The server is running Ubuntu 16.04. There are two packages with that name, they have the versions "2.9.3+dfsg1-1ubuntu0.7" and "2.9.3+dfsg1-1". I can't try with another version at the moment. Will try to build up another environment for that with Ubuntu 20.04, I have nothing newer. ------------------------------------------------------------------------ [2020-06-08 09:09:08] cmb@php.net I don't think this related to the OS, but rather to the libxml2 version. Which one do you use? Could you try with latest? ------------------------------------------------------------------------ [2020-06-07 15:33:25] nospam at unclassified dot de Is this issue tracker still in use and is anybody here? It feels a little lonely in here. ------------------------------------------------------------------------ [2019-11-02 19:20:57] nospam at unclassified dot de Can somebody please have a quick look at this? To me this looks like a simple fix, just edit that one line that sets the option for the Linux build. ------------------------------------------------------------------------ [2019-06-08 14:41:14] nospam at unclassified dot de It seems Linux always adds the LIBXML_NOBLANKS option whereas Windows does not. I can get the same result on Windows as on Linux when I use this code: $dom->loadHTML($html, LIBXML_NOBLANKS); But there is not option that inverts that option. To me it looks like the Linux build of PHP has the bug that the LIBXML_NOBLANKS option is always added while it should not. I couldn't find information about that option because the libxml documentation has no description of this option. It's just empty. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=78129 -- Edit this bug report at https://bugs.php.net/bug.php?id=78129&edit=1

« previous php.bugs (#227480) next »