From 430c0b7a6d74b756d38ea31f4911ca1bb541bdd1 Mon Sep 17 00:00:00 2001 From: wibyweb <49052850+wibyweb@users.noreply.github.com> Date: Thu, 28 Sep 2023 01:01:42 -0400 Subject: [PATCH] Update core.go --- go/core/core.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/go/core/core.go b/go/core/core.go index 6df240c..29f6d90 100755 --- a/go/core/core.go +++ b/go/core/core.go @@ -92,11 +92,15 @@ func handler(w http.ResponseWriter, r *http.Request) { //Check if query and page params exist if _, ok := m["q"]; ok { - query = strings.Replace(m["q"][0], "'", "''", -1) + query = m["q"][0] + query = strings.Replace(query, "'", "''", -1) + query = strings.Replace(query, "+ ", " ", -1) + query = strings.Replace(query, "- ", " ", -1) queryNoQuotes = query } if _, ok := m["p"]; ok {//gets page num, will convert to offset further down - page = strings.Replace(m["p"][0], "'", "''", -1) + page = m["p"][0] + page = strings.Replace(page, "'", "''", -1) offset = page }