aboutsummaryrefslogtreecommitdiff
path: root/src/shared/commands.js
diff options
context:
space:
mode:
authorOlle Fredriksson <fredriksson.olle@gmail.com>2017-11-26 12:02:08 +0100
committerGitHub <noreply@github.com>2017-11-26 12:02:08 +0100
commit86421b75867a48bfb8930c4b5ddf1292a63726c3 (patch)
tree16f18b1cd9c0c2b0c91ed99bfa135a05b30f25cf /src/shared/commands.js
parent0b37c2250e21e8c40c2c5e9abfe51903458cc94d (diff)
Use encodeURIComponent for search queries
Should fix issue #244.
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));
}
};