diff options
Diffstat (limited to 'src/driver/svg.php')
-rw-r--r-- | src/driver/svg.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/driver/svg.php b/src/driver/svg.php index 9511777..68353b8 100644 --- a/src/driver/svg.php +++ b/src/driver/svg.php @@ -516,7 +516,14 @@ class ezcGraphSvgDriver extends ezcGraphDriver return $string; default: // Manual escaping of non ANSII characters, because ext/DOM fails here - return preg_replace( '/[\\x80-\\xFF]/e', 'sprintf( \'&#x%02x;\', ord( \'\\0\') )', $string ); + return preg_replace_callback( + '/[\\x80-\\xFF]/', + create_function( + '$char', + 'return sprintf( \'&#x%02x;\', ord( $char[0] ) );' + ), + $string + ); } } |