From 362e8c3910ff77d7ace31d2496df553831bbc93f Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 4 Aug 2013 15:29:46 +0200 Subject: type/default: urlencode filenames when using canvas Since commit v0.3-97-g5793a8c [integrate jsrrdgraph in CGP], double quotes have been removed around filenames and legend because it shouldn't be necessary (and jsrrdgraph didn't support it). This broke graphs rendered using jsrrdgraph with files including spaces in it's name. Hopefully this is fixed now by rawurlencoding them (but the /). --- type/Default.class.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'type') diff --git a/type/Default.class.php b/type/Default.class.php index 01718e4..0d3971f 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -123,6 +123,8 @@ class Type_Default { function parse_filename($file) { if ($this->graph_type == 'canvas') { $file = 'rrd.php/' . str_replace($this->datadir . '/', '', $file); + # rawurlencode all but / + $file = str_replace('%2F', '/', rawurlencode($file)); } return $this->rrd_escape($file); } -- cgit v1.1