aboutsummaryrefslogtreecommitdiff
path: root/util/url_generator.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-07-04 00:06:31 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-07-04 00:06:31 +0530
commit2a1dc51d0bf9e4d440e33dc01f86947985aff787 (patch)
treeaa718233e3666d799c6324aa1056c0d1277f18df /util/url_generator.go
parent0c369e01d7da80edc0d1e296fde6336cf3de17df (diff)
Bug Fix: correctly parsing fields so spaces aren't ignored
Diffstat (limited to 'util/url_generator.go')
-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)
}
}