Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query params in http link on Windows #9

Closed
3y3 opened this issue Dec 15, 2014 · 3 comments · Fixed by #12
Closed

Query params in http link on Windows #9

3y3 opened this issue Dec 15, 2014 · 3 comments · Fixed by #12

Comments

@3y3
Copy link

3y3 commented Dec 15, 2014

http://www.example.com?param1=1&param2=2

opens as

http://www.example.com?param1=1

because & symbol parses as command separator.
Correct link:

http://www.example.com?param1=1^&param2=2

Is this expected behavior?

@domenic
Copy link
Owner

domenic commented Dec 15, 2014

No, definitely not expected behavior. Adding some escaping would be quite welcome.

@michaeldrotar
Copy link

I ran into this as well and tried to double quote the url, but got an error that windows couldn't find /http://myurl... not sure why it had a slash in front. I found that exec seems to work with a quoted url though on Windows.

.exec('cmd /c start "" "'+url+'"')

@domenic
Copy link
Owner

domenic commented Mar 16, 2015

That makes me think opener('"http://www.example.com?param1=1^&param2=2"') will work (i.e. actually include the double quotes). I'd be open to auto-escaping but currently we support multiple arguments (I'm not sure why) which makes it kind of tricky...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants