do not redirect to / if bang is not known
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3543dd5df8
commit
051bd354a4
|
@ -66,9 +66,11 @@ func parseBang(searchQuery string) (bang string, query string) {
|
|||
|
||||
func evaluateBang(searchQuery string, searchEngine string) (query string, engine string) {
|
||||
bang, query := parseBang(searchQuery)
|
||||
if bang == "" {
|
||||
return query, searchEngine
|
||||
engine = bangs[bang]
|
||||
|
||||
if (bang == "" || engine == ""){
|
||||
return searchQuery, searchEngine
|
||||
} else {
|
||||
return query, bangs[bang]
|
||||
return query, engine
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue