Skip to content

Commit c3ee846

Browse files
authored
Merge pull request #19 from NETWAYS/fix/special-chars-variables
Encode custom variable that contain special characters
2 parents c2389ea + 77c5a97 commit c3ee846

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

application/controllers/IcingadbimgController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function indexAction()
193193
$this->customVars = str_replace($search, $replace, $this->customVars);
194194
}
195195

196-
// urlencodee values
196+
// urlencode values
197197
$customVars = "";
198198
foreach (preg_split('/\&/', $this->customVars, -1, PREG_SPLIT_NO_EMPTY) as $param) {
199199
$arr = explode("=", $param);

library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public function getPreviewHtml(Model $object, $report = false)
437437
if ($this->dataSource === "graphite") {
438438
$arr[1] = Util::graphiteReplace($arr[1]);
439439
}
440-
$customVars .= '&' . $arr[0] . '=' . rawurlencode($arr[1]);
440+
$customVars .= '&' . $arr[0] . '=' . rawurlencode(implode('=', array_slice($arr, 1)));
441441
}
442442
$this->customVars = $customVars;
443443
}

0 commit comments

Comments
 (0)