From b1be9bbba1c2428a8083f9014bfaeed8cdca15c4 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Wed, 23 Jul 2014 23:02:36 +0200 Subject: type/base: stop escaping characters manually since we use escapeshellarg() Closes #89 --- type/Base.class.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'type/Base.class.php') diff --git a/type/Base.class.php b/type/Base.class.php index 61973c9..90056cf 100644 --- a/type/Base.class.php +++ b/type/Base.class.php @@ -137,13 +137,8 @@ class Type_Base { } function rrd_escape($value) { - if ($this->graph_type == 'canvas') { - # http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#IEscaping_the_colon - return str_replace(':', '\:', $value); - } else { - # php needs it double escaped to execute rrdtool correctly - return str_replace(':', '\\\:', $value); - } + # http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#IEscaping_the_colon + return str_replace(':', '\:', $value); } function parse_filename($file) { @@ -151,9 +146,6 @@ class Type_Base { $file = str_replace($this->datadir . '/', '', $file); # rawurlencode all but / $file = 'rrd.php?' . str_replace('%2F', '/', rawurlencode($file)); - } else { - # escape characters - $file = str_replace(array(' ', '(', ')'), array('\ ', '\(', '\)'), $file); } return $this->rrd_escape($file); } -- cgit v1.1