diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-10-18 10:03:45 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-10-18 10:03:45 +0000 |
commit | 4dd974341fc9ab5fd36a8db4ed087c89a3295950 (patch) | |
tree | 692000ac2c9ebcccb538f95a984b572bb8b7bae4 /src/driver/svg.php | |
parent | 240b052f10296f2bf7f598789929fb4fc6252900 (diff) | |
download | zetacomponents-graph-4dd974341fc9ab5fd36a8db4ed087c89a3295950.zip zetacomponents-graph-4dd974341fc9ab5fd36a8db4ed087c89a3295950.tar.gz |
- Use htmlentities to escape texts in SVG driver
Diffstat (limited to 'src/driver/svg.php')
-rw-r--r-- | src/driver/svg.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/driver/svg.php b/src/driver/svg.php index 459c60d..b20af5a 100644 --- a/src/driver/svg.php +++ b/src/driver/svg.php @@ -697,7 +697,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver // Optionally draw text shadow if ( $text['font']->textShadow === true ) { - $textNode = $this->dom->createElement( 'text', $string ); + $textNode = $this->dom->createElement( 'text', htmlentities( $string ) ); $textNode->setAttribute( 'id', $text['id'] ); $textNode->setAttribute( 'x', $position->x + $this->options->graphOffset->x + $text['font']->textShadowOffset ); $textNode->setAttribute( 'text-length', $this->getTextWidth( $string, $size ) . 'px' ); @@ -718,7 +718,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver } // Finally draw text - $textNode = $this->dom->createElement( 'text', $string ); + $textNode = $this->dom->createElement( 'text', htmlentities( $string ) ); $textNode->setAttribute( 'id', $text['id'] ); $textNode->setAttribute( 'x', $position->x + $this->options->graphOffset->x ); $textNode->setAttribute( 'text-length', $this->getTextWidth( $string, $size ) . 'px' ); |