aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2012-10-23 12:00:30 +0100
committerStephen Blott2012-10-23 12:00:30 +0100
commit213ea560f17a652c164c7dc8fbd9662141794b16 (patch)
tree641c2107605450cec3ddf5c019576d0242f627b1
parentc380cb5c9c8dd786b8203d2ed10d451da2ece2b7 (diff)
downloadvimium-213ea560f17a652c164c7dc8fbd9662141794b16.tar.bz2
Revert previous change whereby "+" characters inserted between search
terms are not URLencoded.
-rw-r--r--lib/utils.coffee12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index 778d338f..a44bc06c 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -91,15 +91,9 @@ Utils =
# Creates a search URL from the given :query.
createSearchUrl: (query) ->
- # 1. pull default search engine from settings
- # 2. don't URLencode the "+",
- # - chrome does not URLencode the "+" sign when sending requests to its
- # default search engine, so we should do the same here
- #
- # note: it would be better to pull the default search engine from chrome
- # itself, but I'm not sure if/how that's possible
- #
- Settings.get("searchUrl") + query.split(/\s+/).map(encodeURIComponent).join("+")
+ # it would be better to pull the default search engine from chrome itself,
+ # but it is not clear if/how that is possible
+ Settings.get("searchUrl") + encodeURIComponent(query)
# Converts :string into a Google search if it's not already a URL. We don't bother with escaping characters
# as Chrome will do that for us.