We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9b4d92 commit 87f66a7Copy full SHA for 87f66a7
src/libraries/System.Private.Uri/src/System/UriBuilder.cs
@@ -262,6 +262,9 @@ private static string EncodeUserInfo(string? input)
262
return string.Empty;
263
}
264
265
+ // The following characters ("/" / "\" / "?" / "#" / "@") are from the gen-delims group.
266
+ // We have to escape them to avoid corrupting the rest of the Uri string.
267
+ // Other characters like spaces or non-ASCII will be escaped by Uri, we can ignore them here.
268
if (input.AsSpan().IndexOfAny(@"/\?#@") < 0)
269
{
270
return input;
0 commit comments