Home » Images » Image_Canvas » Bug #5786
Error in producing SVG
Details
| Submitted | 2005-10-26 11:42 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) |
Comments
[2005-10-26 11: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.
[2005-10-26 17:16 UTC] p dot kirov at gmail dot com
Thanks a lot for fast answer :). You are rigth htmlspecialchars() will be better solutiotion.