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

Bug #220 & Break after process
Submitted: 2003-11-10 10:01 UTC
From: saran at inra dot co dot th Assigned: schst
Status: Closed Package: XML_Beautifier
PHP Version: 4.3.3 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2003-11-10 10:01 UTC] saran at inra dot co dot th
Description: ------------ When pass xml string that has '&AMP;' characters to formatString function, it will break to '& AMP;' (Note the space) and thus make this xml invalid. Reproduce code: --------------- $store="mark & spencer"; $store=htmlentities($store); // now store=='mark & spencer' require_once('xml/beautifier.php'); $bf=new XML_Beautifier(); $xml="<?xml version=\"1.0\"?><root><store>$store</store></root>"; $xml=$bf->formatString($xml); echo $xml; Expected result: ---------------- <?xml version="1.0"?> <root> <store>mark & spencer</store> </root> Actual result: -------------- <?xml version="1.0"?> <root> <store>mark & amp; spencer</store> </root>

Comments

 [2003-11-10 10:12 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2003-11-10 20:49 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2003-11-11 02:14 UTC] saran at inra dot co dot th
Please accept my apologies, there is my fault in the first post. I did htmlentities() twice that's why it look like '& AMP;' breaks. But coincidently there is missing special characters treatment routine at that point and it is now fixed in CVS. Thanks for your prompt response and I will be more careful in the next post.
 [2003-11-11 19:37 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!