Permalink
Browse files

Fixed encoding in search query

  • Loading branch information...
p3k committed Apr 17, 2015
1 parent 587eac8 commit a57311c412747292b2cd0c687dcab40facecbaee
Showing with 1 addition and 1 deletion.
  1. +1 −1 compat/Global/aspects.js
View
@@ -237,7 +237,7 @@ Members.prototype.onCodeUpdate = function() {
if (getProperty('google-search') === 'true') {
if (req.data.q) {
if (!req.data.q.contains('site:')) {
- res.redirect(site.href(req.action) + '?q=' + req.data.q + encodeURIComponent(' site:' + site.href().replace('test.www.', '')));
+ res.redirect(site.href(req.action) + '?q=' + encodeURIComponent(req.data.q + ' site:' + site.href().replace('test.www.', '')));
} else {
req.data.q = req.data.q.replace(/\s+site:.+$/, String.EMPTY);
}

0 comments on commit a57311c

Please sign in to comment.