d7fc9b87f92fbd0c03eb99b8c69318468f69e61e

Author
jackh <jackhuang1205@gmail.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

fix(frontend-search): URL-encode search parameters (#10910)

Fixes #10884
Closes #10910

Diff

 1diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
 2index 7f8d5c90c0e28a8c1ac26e219fc228ccc0c13dc9..b9e2fe95d48182490fef76e7a377fd66333c7c15 100644
 3--- a/plugins/frontend-search/frontend-search.plugin.zsh
 4+++ b/plugins/frontend-search/frontend-search.plugin.zsh
 5@@ -103,8 +103,7 @@ function frontend() {
 6 
 7   # build search url:
 8   # join arguments passed with '%20', then append to search context URL
 9-  # TODO substitute for proper urlencode method
10-  url="${urls[$1]}${(j:%20:)@[2,-1]}"
11+  url="${urls[$1]}$(omz_urlencode -P ${@[2,-1]})"
12 
13   echo "Opening $url ..."
14