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

Request #3180 Serialize/unserialize CDATA elements
Submitted: 2005-01-12 19:52 UTC
From: roehr at zilleon dot com Assigned: schst
Status: Closed Package: XML_Serializer
PHP Version: Irrelevant OS: irrelevant
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 : 21 - 10 = ?

 
 [2005-01-12 19:52 UTC] roehr at zilleon dot com
Description: ------------ Hi, it would be great to be able to serialize/unserialize CDATA elements. As XML_Serializer sits on top of XML_Util and Util does provide this feature, maybe it's not that hard to integrate this into XML_Serializer as well. Thank you very much for your efforts! Best regards, Torsten Roehr

Comments

 [2005-01-13 12:39 UTC] roehr at zilleon dot com
One more thing: Why is htmlspecialchars() applied by default when serializing? Shouldn't the resulting XML string be output-neutral? Maybe you could add an option for this that defaults to true to keep BC. Thank you.
 [2005-01-13 12:45 UTC] schst
htmlspecialchars() replaces <, >, &, " and ', those characters may not be used in XML documents, thus they are replaced.
 [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
Could you please open a different bug report for this? one is a new feature, the other one is a bug. Thanks. Stephan
 [2005-09-22 14:54 UTC] schst
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net 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.