Adds query escaping
This commit is contained in:
parent
f47f6597f4
commit
0227523487
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
@ -712,8 +713,8 @@ func (c *client) search(query, uri, question string) {
|
||||||
} else {
|
} else {
|
||||||
rootUrl = u.Full
|
rootUrl = u.Full
|
||||||
}
|
}
|
||||||
// escapedEntry := url.QueryEscape(entry) // TODO confirm expected behavior re: escaping
|
escapedEntry := url.PathEscape(entry)
|
||||||
c.Visit(fmt.Sprintf("%s?%s", rootUrl, entry))
|
c.Visit(fmt.Sprintf("%s?%s", rootUrl, escapedEntry))
|
||||||
case "http", "https":
|
case "http", "https":
|
||||||
c.Visit(u.Full)
|
c.Visit(u.Full)
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue