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

Bug #5786 Error in producing SVG
Submitted: 2005-10-26 06:42 UTC Modified: 2005-10-27 16:20 UTC
From: p dot kirov at gmail dot com Assigned: nosey
Status: Closed Package: Image_Canvas
PHP Version: 4.4.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-10-26 06:42 UTC] p dot kirov at gmail dot com
Description: ------------ When generate SVG xml there is error on producing "id" in <g > tag, when there is "&" in plot title I found /usr/share/php/Image/Canvas/SVG.php on line 749 original: $this->_addElement('<g id="' . $name . '">'); my fix: $this->_addElement('<g id="' . str_replace( '&', '__', $name ) . '">'); Maybe this is not the best solution but it is work for now.

Comments

 [2005-10-26 07:00 UTC] nosey
This is a bug with Image_Canvas not Image_Graph. I guess it would be better to use & instead, but the general fix will probably be to use htmlspecialchars() for all "textual" output. Will fix ASAP.
 [2005-10-26 12:16 UTC] p dot kirov at gmail dot com
Thanks a lot for fast answer :). You are rigth htmlspecialchars() will be better solutiotion.
 [2005-10-27 16:20 UTC] nosey
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. Added htmlspecialchars() on addText() and startGroup()