Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.0RC3

Bug #1575 extra whitespace entities break applications
Submitted: 2004-06-08 03:53 UTC
From: alan_k Assigned:
Status: Suspended Package: XML_Tree
PHP Version: 4.3.6 OS: linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 42 + 7 = ?

 
 [2004-06-08 03:53 UTC] alan_k
Description: ------------ The change to include Whitespace entities has broken a number of applications that rely on the fact that they did not exist before.. I think the Default behaviour should remain as before, the new behaviour should be optional.

Comments

 [2004-06-08 04:10 UTC] alan_k
I suggest - add: @var options parser options var $options = array( 'use_cdata_sections' => false, 'strip_whitespace' => true; 'filename' => '', 'version' => '1.0' ); function XML_Tree($options = '', $version='1.0') { if (is_array($options)) { $this->options = $options + $this->options; } else { $this->options['filename'] = $options; $this->options['version'] = $options; } // BC for any wrappers that exist.. - dont use this->filname anymore.. $this->filename = $this->options['filename']; $this->version = $this->options['version']; } It leaves the door open for future additions..
 [2004-06-08 15:29 UTC] alan_k
the change that cause the problem is the removal of this. if (trim($data) != '') { $this->cdata .= $data; }
 [2004-12-07 20:17 UTC] aaron dot hawley at uvm dot edu
Perhaps your application using XML_Tree wasn't fully defined. It might be better to write the condition for when there is whitespace, but in your case, the application would simply do nothing about it. This is easier to fix then the side-effect of turning off or on a configuration optin.
 [2004-12-07 20:24 UTC] aaron dot hawley at uvm dot edu
by "fix" I meant to say "work with". By the way, this advice of writing an application with XML_Tree that considers the whitespace condition, I'm applying it myself.
 [2004-12-15 20:05 UTC] aaron dot hawley at uvm dot edu
 [2006-10-01 19:52 UTC] arnaud (Arnaud Limbourg)
Until the package gets a new maintainer.