From e39ae8eeb30d7b1ed3311ca6111efb529cae8a7b Mon Sep 17 00:00:00 2001 From: Kartikay Date: Tue, 26 Dec 2023 15:04:56 +0530 Subject: [PATCH] Fix URI encoding of strings Signed-off-by: Kartikay --- cmd/thanos/rule.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/thanos/rule.go b/cmd/thanos/rule.go index e8f867347b7..4bbb6626695 100644 --- a/cmd/thanos/rule.go +++ b/cmd/thanos/rule.go @@ -936,7 +936,7 @@ func reloadRules(logger log.Logger, func tableLinkForExpression(tmpl string, expr string) (string, error) { // template example: "/graph?g0.expr={{.Expr}}&g0.tab=1" - escapedExpression := url.QueryEscape(expr) + escapedExpression := strings.ReplaceAll(url.QueryEscape(expr), "+", "%20") escapedExpr := Expression{Expr: escapedExpression} t, err := template.New("url").Parse(tmpl)