From 86421b75867a48bfb8930c4b5ddf1292a63726c3 Mon Sep 17 00:00:00 2001 From: Olle Fredriksson Date: Sun, 26 Nov 2017 12:02:08 +0100 Subject: Use encodeURIComponent for search queries Should fix issue #244. --- src/shared/commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/commands.js') 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)); } }; -- cgit v1.2.3