Skip to content

Commit

Permalink
Allow more than one '+' (space) in URI parameters (hound-search#321)
Browse files Browse the repository at this point in the history
Whoops! Hound was only replacing the first URI-encoded space, not
all of them.
  • Loading branch information
jacobrose authored and kellegous committed Jun 21, 2019
1 parent 6e41bdc commit 838e045
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ui/assets/js/hound.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var ParamsFromQueryString = function(qs, params) {

// Handle classic '+' representation of spaces, such as is used
// when Hound is set up in Chrome's Search Engine Manager settings
pair[1] = pair[1].replace('+', ' ');
pair[1] = pair[1].replace(/\+/g, ' ');

params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
});
Expand Down
Loading

0 comments on commit 838e045

Please sign in to comment.