Bug #67476 [Opn->Fbk]: empty node is filled with sibling

From: Date: Thu, 19 Jun 2014 18:41:11 +0000
Subject: Bug #67476 [Opn->Fbk]: empty node is filled with sibling
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186266@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67476&edit=1 ID: 67476 Updated by: requinix@php.net Reported by: info at gmwconsult dot nl Summary: empty node is filled with sibling -Status: Open +Status: Feedback Type: Bug Package: DOM XML related Operating System: windows PHP Version: 5.4Git-2014-06-19 (snap) Block user comment: N Private report: N New Comment: Works for me. http://3v4l.org/tEfIm Also tried on Windows with 5.5.13, 5.4.29, and 5.3.28, and the 5.5.11 that's bundled with XAMPP 1.8.3-4. To be sure, the test script you provided is exactly what you're using? Try copying it from here and running that. Previous Comments: ------------------------------------------------------------------------ [2014-06-19 11:38:16] info at gmwconsult dot nl Description: ------------ if I load a snippet of html with loadXML() and subsequently echo the contents, the first empty node is filled with the next node. This does not happen if the first node contains &#160; or another empty node. So the result will be: <div> <nav id="filter" > <section id="portfolio_container"> <ul id="stage"> </ul> </section> </nav> </div> php 5.4.19 that comes with xampp running on windows Test script: --------------- $html = '<div> <nav id="filter" /> <section id="portfolio_container"> <ul id="stage"> </ul> </section> </div>'; $doc = new DOMDocument('1.0','utf8'); $doc->loadXML($html); echo"<pre>"; print_r($doc->saveXML()); echo"</pre>"; die(); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67476&edit=1

« previous php.bugs (#186266) next »