Skip to content

querystring: Parse multiple separator characters#3807

Closed
yosuke-furukawa wants to merge 1 commit intomasterfrom
yosuke-patch-1
Closed

querystring: Parse multiple separator characters#3807
yosuke-furukawa wants to merge 1 commit intomasterfrom
yosuke-patch-1

Conversation

@yosuke-furukawa
Copy link
Member

When I explained querystring API for node beginners, I found a weird problem.

var q = qs.stringify({foo: 'bar', bar: 'baz'}, '&&', '=>');
console.log(q); // foo=>bar&&bar=>baz

var parsedQs = qs.parse('foo=>bar&&bar=>baz', '&&', '=>');
console.log(parsedQs); // { foo: '>bar', bar: '>baz' }

I expect {foo: 'bar', bar: 'baz'} but the actual result is {foo: '>bar', bar: '>baz'}.

This PR solves the problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please require('../common');

@cjihrig
Copy link
Contributor

cjihrig commented Nov 13, 2015

LGTM with a few small comments.

@mscdex mscdex added the querystring Issues and PRs related to the built-in querystring module. label Nov 13, 2015
@mscdex
Copy link
Contributor

mscdex commented Nov 13, 2015

LGTM

1 similar comment
@jasnell
Copy link
Member

jasnell commented Nov 13, 2015

LGTM

@yosuke-furukawa
Copy link
Member Author

Thank you @cjihrig. I fixed your comment.
And thank you @mscdex and @jasnell .

yosuke-furukawa added a commit that referenced this pull request Nov 13, 2015
Fix querystring.parse to handle multiple separator characters

PR-URL: #3807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Nov 13, 2015

Landed in a776a86

@jasnell jasnell closed this Nov 13, 2015
yosuke-furukawa added a commit that referenced this pull request Nov 17, 2015
Fix querystring.parse to handle multiple separator characters

PR-URL: #3807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
yosuke-furukawa added a commit that referenced this pull request Nov 30, 2015
Fix querystring.parse to handle multiple separator characters

PR-URL: #3807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
yosuke-furukawa added a commit that referenced this pull request Dec 4, 2015
Fix querystring.parse to handle multiple separator characters

PR-URL: #3807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell jasnell mentioned this pull request Dec 17, 2015
yosuke-furukawa added a commit that referenced this pull request Dec 17, 2015
Fix querystring.parse to handle multiple separator characters

PR-URL: #3807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
yosuke-furukawa added a commit that referenced this pull request Dec 23, 2015
Fix querystring.parse to handle multiple separator characters

PR-URL: #3807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos targos deleted the yosuke-patch-1 branch April 27, 2016 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

querystring Issues and PRs related to the built-in querystring module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants