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

Uri.toString() encodes '=' in query #8466

Closed
chrmarti opened this issue Jun 29, 2016 · 6 comments
Closed

Uri.toString() encodes '=' in query #8466

chrmarti opened this issue Jun 29, 2016 · 6 comments
Assignees
Milestone

Comments

@chrmarti
Copy link
Contributor

Testing #8192

  • VSCode Version: Code - Insiders 1.3.0-insider (d0c2b89, 2016-06-28T05:04:06.083Z)
  • OS Version: Darwin x64 15.5.0

Steps to Reproduce:

  1. vscode.Uri.parse("scheme://authority/path/?param=value#fragment").toString()
    => "scheme://authority/path/?param%3Dvalue#fragment"
  2. The percent encoding of '=' is unexpected.
@chrmarti
Copy link
Contributor Author

Also with .toString(false)

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Jun 29, 2016
@jrieken jrieken added this to the June 2016 milestone Jun 29, 2016
@jrieken
Copy link
Member

jrieken commented Jun 29, 2016

June to clarify. Petty sure we only honour = in the query part of http uri not in others cos only http defines this 'grammar' on the query part

@jrieken
Copy link
Member

jrieken commented Jun 29, 2016

Also with .toString(false)

I don't believe that cos there is test for it ;-)

Encoding the query in toString is a little unhappy esp for html. Tho from the URI spec it's (at least not to me) not obvious that = has a special meaning. Therefore no further action planned.

@jrieken jrieken closed this as completed Jun 29, 2016
@jrieken jrieken removed the bug Issue identified by VS Code Team member as probable bug label Jun 29, 2016
@chrmarti
Copy link
Contributor Author

It will be unexpected to see = encoded if it passed through Uri before being passed on somewhere external as string. (Not arguing with the spec.)

@jrieken
Copy link
Member

jrieken commented Jun 29, 2016

I agree and that's one of the reasons I have added toString(false). One of the reasons I am slightly conservative with this is that we have used someUri.toString() often as key to store stuff (like in local browser storage). Even though I don't think we overly often use the query bit, it will break those cos string identify isn't given anymore...

@chrmarti
Copy link
Contributor Author

Makes sense, thanks. Btw., checked toString(true) works as expected (I was wrongly passing false before).

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants