From 022752348747291ae9bc1d15010c6810764482bd Mon Sep 17 00:00:00 2001 From: sloum Date: Mon, 25 May 2020 19:43:19 -0700 Subject: [PATCH] Adds query escaping --- client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index c2b181d..4617b2d 100644 --- a/client.go +++ b/client.go @@ -3,6 +3,7 @@ package main import ( "fmt" "io/ioutil" + "net/url" "os" "path/filepath" "regexp" @@ -712,8 +713,8 @@ func (c *client) search(query, uri, question string) { } else { rootUrl = u.Full } - // escapedEntry := url.QueryEscape(entry) // TODO confirm expected behavior re: escaping - c.Visit(fmt.Sprintf("%s?%s", rootUrl, entry)) + escapedEntry := url.PathEscape(entry) + c.Visit(fmt.Sprintf("%s?%s", rootUrl, escapedEntry)) case "http", "https": c.Visit(u.Full) default: