From 8a802ec3ece183de84bdcd22a9db58cb7d92810f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Sun, 23 May 2021 21:00:42 +0200 Subject: [PATCH] Use QueryEscape --- main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.go b/main.go index 37cc689..476d555 100644 --- a/main.go +++ b/main.go @@ -146,9 +146,8 @@ func propagate(bridge *bridgeCfg, name string, value string, prefix string) bool if stringSuffixInSlice(name, roomFieldsTemperature) { value = strings.Replace(value, ".", "", -1) } - value = strings.Replace(value, " ", "+", -1) - url := "http://" + bridge.HeatingURL + "/cgi-bin/writeVal.cgi?" + prefix + "." + name + "=" + value + url := "http://" + bridge.HeatingURL + "/cgi-bin/writeVal.cgi?" + prefix + "." + name + "=" + url.QueryEscape(value) resp, err := http.Get(url) if err == nil {