-
Notifications
You must be signed in to change notification settings - Fork 757
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
Encoding DocumentUri.Path
when converting DocumentUri
to Uri
#11574
Conversation
DocumentUri.Path
DocumentUri.Path
when converting DocumentUri to Uri
DocumentUri.Path
when converting DocumentUri to UriDocumentUri.Path
when converting DocumentUri
to Uri
94c4be3
to
0ddb3bf
Compare
Have you weighed up this approach against using Fiddle: https://dotnetfiddle.net/ReOvDS |
That's a good find. I haven't explored |
{ | ||
#pragma warning disable RS0030 // Do not use banned APIs | ||
return documentUri | ||
.With(new() { Path = documentUri.Path.Replace("%", "%25") }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why 25
specifically is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%25
is the url-encoded string for the %
character: https://www.w3schools.com/tags/ref_urlencode.ASP.
@shenglol I haven't read through the PR completely, but do we have any remaining ToUri() calls left? If not, should we make that a banned symbol? |
Yup, it's already a banned symbol. |
Nice! |
This is a workaround for OmniSharp/csharp-language-server-protocol#1005.
Fixes #9466.
Microsoft Reviewers: Open in CodeFlow