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 class converts $ to %24 #86043

Closed
DanTup opened this issue Dec 3, 2019 · 5 comments
Closed

Uri class converts $ to %24 #86043

DanTup opened this issue Dec 3, 2019 · 5 comments
Assignees

Comments

@DanTup
Copy link
Contributor

DanTup commented Dec 3, 2019

I don't know if this is related to #83645, but my comment on that issue was marked as off-topic.

The URI class seems to unexpectedly encode the $ character:

vs.Uri.parse("http://localhost:1234/$debug").toString()
"http://localhost:1234/%24debug"

Similar code in JavaScript doesn't do this:

new URL('http://localhost:1234/$debug').toString()
"http://localhost:1234/$debug"
@weinand weinand assigned jrieken and unassigned weinand Dec 3, 2019
@jrieken jrieken added the uri label Dec 3, 2019
@jrieken
Copy link
Member

jrieken commented Dec 3, 2019

Yes - that a known bug that we cannot fix anymore as too many extension are relying on the "wrong" encoding.

@DanTup
Copy link
Contributor Author

DanTup commented Dec 3, 2019

@jrieken are there any plans to address this in some other way? It feels weird to have to do manual replacements on URIs all over the place for expected behaviour (probably extensions will end up making their own class). Couldn't it be solved with a flag on the object, so we can opt-in to "correct" behaviour?

@jrieken
Copy link
Member

jrieken commented Dec 3, 2019

@jrieken are there any plans to address this in some other way?

The general answer is "no" (see #83645) but it depends on your use-case

@DanTup
Copy link
Contributor Author

DanTup commented Dec 3, 2019

support URL in our API, namely openExternal and DocumentLinkProvider

The place I hit this was asExternalUri. If that will be updated to use a compliant URL (I presume it would if openExternal is), then I think that solve the place I've had to put custom replaces. However the issue that's linked to is closed and links back to that issue, so it's not clear whether that's still the plan?

@jrieken
Copy link
Member

jrieken commented Dec 3, 2019

#85930

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

No branches or pull requests

3 participants