aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/url_generator.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/url_generator.go b/util/url_generator.go
index 7e548f5..1782a38 100644
--- a/util/url_generator.go
+++ b/util/url_generator.go
@@ -18,6 +18,7 @@ package util
import (
"errors"
+ "net/url"
)
var URLNameValueError error = errors.New("URLNameValueError: Number of names and values passed to URLGenerator don't match.")
@@ -44,9 +45,9 @@ func UrlGenerator(baseUrl string, names []string, values [][]string, isPrimary b
// add values to data variable
for i, j := range values[index] {
if i > 0 {
- data = data + "," + j
+ data = data + "," + url.QueryEscape(j)
} else {
- data = data + j
+ data = data + url.QueryEscape(j)
}
}