Skip to content

Commit

Permalink
Merge pull request #11 from ludwiktrammer/master
Browse files Browse the repository at this point in the history
Fix double encoding of spaces
  • Loading branch information
alrusdi committed Oct 26, 2015
2 parents ba75fc7 + 9a984d7 commit b4eb2ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jquery.query-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ new function(settings) {
var i = 0, queryString = [], chunks = [], self = this;
var encode = function(str) {
str = str + "";
if ($spaces) str = str.replace(/ /g, "+");
return encodeURIComponent(str);
str = encodeURIComponent(str);
if ($spaces) str = str.replace(/%20/g, "+");
return str;
};
var addFields = function(arr, key, value) {
if (!is(value) || value === false) return;
Expand Down

0 comments on commit b4eb2ff

Please sign in to comment.