diff options
Diffstat (limited to '')
-rw-r--r-- | type/Default.class.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/type/Default.class.php b/type/Default.class.php index 416a352..01718e4 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -111,7 +111,13 @@ class Type_Default { | |||
111 | } | 111 | } |
112 | 112 | ||
113 | function rrd_escape($value) { | 113 | function rrd_escape($value) { |
114 | return str_replace(':', '\:', $value); | 114 | if ($this->graph_type == 'canvas') { |
115 | # http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#IEscaping_the_colon | ||
116 | return str_replace(':', '\:', $value); | ||
117 | } else { | ||
118 | # php needs it double escaped to execute rrdtool correctly | ||
119 | return str_replace(':', '\\\:', $value); | ||
120 | } | ||
115 | } | 121 | } |
116 | 122 | ||
117 | function parse_filename($file) { | 123 | function parse_filename($file) { |