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

From: Date: Fri, 20 Jun 2014 07:29:38 +0000
Subject: Bug #67476 [Fbk->Csd]: empty node is filled with sibling
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186269@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 User updated by: info at gmwconsult dot nl Reported by: info at gmwconsult dot nl Summary: empty node is filled with sibling -Status: Feedback +Status: Closed 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: As it turns out, this is actually a browser interpretation problem. IE displays the html as expected, but Chrome and FF shift the second node into the first. Thank you for your effort. Previous Comments: ------------------------------------------------------------------------ [2014-06-19 18:41:10] requinix@php.net 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. ------------------------------------------------------------------------ [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 (#186269) next »