Skip to content

Commit

Permalink
allow + in "grep" querystring; closes #2626
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Dec 19, 2016
1 parent c82c493 commit f6605cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -322,7 +322,7 @@ exports.parseQuery = function (qs) {
var key = pair.slice(0, i);
var val = pair.slice(++i);

obj[key] = decodeURIComponent(val);
obj[key] = decodeURIComponent(val.replace(/\+/g, '%20'));
return obj;
}, {});
};
Expand Down
4 changes: 4 additions & 0 deletions test/utils.spec.js
Expand Up @@ -95,6 +95,10 @@ describe('utils', function () {
r3: '^co.*'
});
});

it('should parse "+" as a space', function () {
parseQuery('?grep=foo+bar').should.eql({grep: 'foo bar'});
});
});

describe('.stackTraceFilter()', function () {
Expand Down

0 comments on commit f6605cf

Please sign in to comment.