From 2a1dc51d0bf9e4d440e33dc01f86947985aff787 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 4 Jul 2022 00:06:31 +0530 Subject: Bug Fix: correctly parsing fields so spaces aren't ignored --- util/url_generator.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util') 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) } } -- cgit v1.2.3