From b66c785616f5447196cd9aa64bf97be2cb9ee650 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 2 Feb 2017 11:11:24 +0100 Subject: [PATCH] encoding: re-encode everything, allow colon fixes #16 fixes #17 --- application/controllers/ShowController.php | 2 +- library/Graphite/GraphiteUtil.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/ShowController.php b/application/controllers/ShowController.php index f029b81..427142e 100644 --- a/application/controllers/ShowController.php +++ b/application/controllers/ShowController.php @@ -133,7 +133,7 @@ class ShowController extends Controller ); foreach ($this->params->toArray() as $val) { - $query->where($val[0], $val[1]); + $query->where($val[0], urldecode($val[1])); } $img = $this->applyGraphParams(current($query->getImages($template))) diff --git a/library/Graphite/GraphiteUtil.php b/library/Graphite/GraphiteUtil.php index efafec6..2c3fe6e 100644 --- a/library/Graphite/GraphiteUtil.php +++ b/library/Graphite/GraphiteUtil.php @@ -106,6 +106,6 @@ class GraphiteUtil public static function escape($string) { - return preg_replace('/[^a-zA-Z0-9\*\-]/', '_', $string); + return preg_replace('/[^a-zA-Z0-9\*\-:]/', '_', $string); } }