From 140c977a3d82410f48c198596de193d2d6b7b9b5 Mon Sep 17 00:00:00 2001 From: jackh Date: Wed, 4 May 2022 00:30:18 +0800 Subject: [PATCH] fix(web-search): URL-encode search parameters (#10910) Fixes #10884 --- plugins/web-search/web-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 0a2b8809e..229948894 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -35,7 +35,7 @@ function web_search() { if [[ $# -gt 1 ]]; then # build search url: # join arguments passed with '+', then append to search engine URL - url="${urls[$1]}${(j:+:)@[2,-1]}" + url="${urls[$1]}$(omz_urlencode ${@[2,-1]})" else # build main page url: # split by '/', then rejoin protocol (1) and domain (2) parts with '//'