aboutsummaryrefslogtreecommitdiff
path: root/src/shared/commands.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-11-29 18:54:57 +0900
committerGitHub <noreply@github.com>2017-11-29 18:54:57 +0900
commitd5517345a81831135aaad2ebfac2ebb1a427b55d (patch)
treefd41c709e717ebc2f5d19ee0437e38b57fd7fa53 /src/shared/commands.js
parent8361b70d0b0d5051bcc268d36cbffed27579220a (diff)
parent86421b75867a48bfb8930c4b5ddf1292a63726c3 (diff)
Merge pull request #252 from ollef/patch-1
Use encodeURIComponent for search queries
Diffstat (limited to 'src/shared/commands.js')
-rw-r--r--src/shared/commands.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/commands.js b/src/shared/commands.js
index 8edeb5c..ed64a63 100644
--- a/src/shared/commands.js
+++ b/src/shared/commands.js
@@ -9,7 +9,7 @@ const normalizeUrl = (args, searchConfig) => {
if (concat.includes('.') && !concat.includes(' ')) {
return 'http://' + concat;
}
- let query = encodeURI(concat);
+ let query = concat;
let template = searchConfig.engines[
searchConfig.default
];
@@ -19,7 +19,7 @@ const normalizeUrl = (args, searchConfig) => {
template = searchConfig.engines[key];
}
}
- return template.replace('{}', query);
+ return template.replace('{}', encodeURIComponent(query));
}
};