diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-12-07 16:03:06 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-12-07 16:03:06 +0000 |
commit | 77fb248d7dee40af3a41ca335ef033e88145f64e (patch) | |
tree | f026d75695af82375119a4c9033f35485946e3ec /src | |
parent | 0172f018702d2a4c59c1569b5cf9fae5ba601f7b (diff) | |
download | zetacomponents-graph-77fb248d7dee40af3a41ca335ef033e88145f64e.zip zetacomponents-graph-77fb248d7dee40af3a41ca335ef033e88145f64e.tar.gz |
- Do not use modifier e, because it may be disabled with suhosin extension
Diffstat (limited to 'src')
-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 + ); } } |