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

Bug #4961 Package echoes text with htmlentities()
Submitted: 2005-08-01 14:39 UTC
From: jan dot pieter dot kunst at meertens dot knaw dot nl Assigned: yunosh
Status: Closed Package: XML_SVG
PHP Version: 5.0.4 OS: Mac OS X
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-01 14:39 UTC] jan dot pieter dot kunst at meertens dot knaw dot nl
Description: ------------ The printElement() method of the XML_SVG_Textpath wraps $this->_text in htmlentities(), but it should use htmlspecialchars(). (Named character entities like é don't exist in XML by default.) Test script: --------------- patch for the SVG.php file: --- /usr/local/php/lib/php/XML/SVG.php Mon Jun 13 09:22:32 2005 +++ SVG.php Mon Aug 1 16:31:19 2005 @@ -291,7 +291,7 @@ echo '<' . $element; $this->printParams('id', 'x', 'y', 'dx', 'dy', 'rotate', 'textLength', 'lengthAdjust', 'style', 'transform'); - echo '>' . htmlentities($this->_text); + echo '>' . htmlspecialchars($this->_text); parent::printElement(); echo "</$element>\n"; } Expected result: ---------------- I would expect to see accented letters as actual characters instead of named character entities in <text> elements. Actual result: -------------- Named character entities in <text> elements.

Comments

 [2005-08-01 14:53 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!