summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackh <jackhuang1205@gmail.com>2022-05-04 00:34:22 +0800
committerMarc Cornellà <hello@mcornella.com>2022-05-12 15:06:44 +0200
commitd7fc9b87f92fbd0c03eb99b8c69318468f69e61e (patch)
tree3777dfacced4688194cfec8e3cbf106641fce9e4
parent140c977a3d82410f48c198596de193d2d6b7b9b5 (diff)
downloadzsh-d7fc9b87f92fbd0c03eb99b8c69318468f69e61e.tar.gz
zsh-d7fc9b87f92fbd0c03eb99b8c69318468f69e61e.tar.bz2
zsh-d7fc9b87f92fbd0c03eb99b8c69318468f69e61e.zip
fix(frontend-search): URL-encode search parameters (#10910)
Fixes #10884 Closes #10910
-rw-r--r--plugins/frontend-search/frontend-search.plugin.zsh3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
index 7f8d5c90c..b9e2fe95d 100644
--- a/plugins/frontend-search/frontend-search.plugin.zsh
+++ b/plugins/frontend-search/frontend-search.plugin.zsh
@@ -103,8 +103,7 @@ function frontend() {
# build search url:
# join arguments passed with '%20', then append to search context URL
- # TODO substitute for proper urlencode method
- url="${urls[$1]}${(j:%20:)@[2,-1]}"
+ url="${urls[$1]}$(omz_urlencode -P ${@[2,-1]})"
echo "Opening $url ..."