1diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
2index 1b42abe86a9cf84ef3d7b69332d41b20b77b04c0..0fa2852dc374160766d43fec4296762e3673359f 100644
3--- a/plugins/web-search/web-search.plugin.zsh
4+++ b/plugins/web-search/web-search.plugin.zsh
5@@ -37,9 +37,14 @@ function web_search() {
6 7 # search or go to main page depending on number of arguments passed
8 if [[ $# -gt 1 ]]; then
9+ # if search goes in the query string ==> space as +, otherwise %20
10+ # see https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20
11+ local param="-P"
12+ [[ "$urls[$1]" =~ .*\?.*=$ ]] && param=""
13+
14 # build search url:
15 # join arguments passed with '+', then append to search engine URL
16- url="${urls[$1]}$(omz_urlencode ${@[2,-1]})"
17+ url="${urls[$1]}$(omz_urlencode $param ${@[2,-1]})"
18 else
19 # build main page url:
20 # split by '/', then rejoin protocol (1) and domain (2) parts with '//'