summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-12-07 16:03:06 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-12-07 16:03:06 +0000
commit77fb248d7dee40af3a41ca335ef033e88145f64e (patch)
treef026d75695af82375119a4c9033f35485946e3ec
parent0172f018702d2a4c59c1569b5cf9fae5ba601f7b (diff)
downloadzetacomponents-graph-77fb248d7dee40af3a41ca335ef033e88145f64e.zip
zetacomponents-graph-77fb248d7dee40af3a41ca335ef033e88145f64e.tar.gz
- Do not use modifier e, because it may be disabled with suhosin extension
-rw-r--r--src/driver/svg.php9
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
+ );
}
}
OpenPOWER on IntegriCloud