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

Bug #3700 The data are always trimmed
Submitted: 2005-03-04 10:07 UTC
From: rguglielmi at libero dot it Assigned: schst
Status: Closed Package: XML_Serializer
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
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:
Solve the problem : 37 + 35 = ?

 [2005-03-04 10:07 UTC] rguglielmi at libero dot it
Description: ------------ The spaces at the beginning and at the end of the data are deleted in the endHandler function of the class XML_Unserializer. The line of code should be this: $data = trim($this->_dataStack[$this->_depth]);


 [2005-04-11 18:30 UTC] schst
This is intended behaviour and will not be changed.
 [2005-04-12 08:33 UTC] rguglielmi at libero dot it
I report a part of the Request #3180: >>[2005-01-14 16:29 UTC] pear at yavanna dot net >>I don't know about serializing CDATA Elements with >>XML_Serializer, but >>unserialize works. Though the data's spaces are trimmed at >>beginning >>and end (in the endHandler of XML_Unserializer), which is >>definitively >>undesired. >>If you kindly could consider this in the next release? >>Thanks! >> >>[2005-01-14 16:33 UTC] schst at php dot net >>Could you please open a different bug report for this? one >>is a new >>feature, the other one is a bug. >>Thanks. >>Stephan Have I misunderstood something? Maybe you could add an option for this behaviour. Thanks
 [2005-04-12 09:16 UTC] schst
OK, I'll add an option to influence this.
 [2005-05-10 20:50 UTC] paul at paulbaranowski dot org
I also have a problem due to this behavior. I am storing strings in an XML file and I need to read them back out EXACTLY as I put them in. Note: the spaces are PRESERVED when writing the XML - why wouldnt it strip off the spaces at this point as well? Perhaps you could explain *why* this is the intended behavior? Is it part of some spec that this must behave this way? An option to change this behavior would be great! Thanks for the wonderful code!
 [2005-09-22 14:40 UTC] schst
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.