dotnet / dotnet/dotnet-api-docs

Uri.EscapeUriString/EscapeDataString don't do the same thing, yet both have the same remarks section

Open
#4,174 1 comment 2 reactions 0 assignees View on GitHub
area-System.Net Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

The [Uri.EscapeUriString](https://docs.microsoft.com/en-us/dotnet/api/system.uri.escapeuristring?view=netcore-3.1#remarks) and [Uri.EscapeDataString](https://docs.microsoft.com/en-us/dotnet/api/system.uri.escapedatastring?view=netcore-3.1#remarks) methods share the same description/remarks section. Since the behavior of both methods is different, their remarks section should **not** describe the same behavior.

Perhaps this could be improved together with https://github.com/dotnet/dotnet-api-docs/issues/3906.

------
This is the current short description for both methods:
> Converts a URI string to its escaped representation.

And this is their identical remarks section:
> By default, the {MethodName} method converts all characters[,] except [for] RFC 2396 unreserved characters[,] to their hexadecimal representation. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the {MethodName} method converts all characters, except for RFC 3986 unreserved characters, to their hexadecimal representation. All Unicode characters are converted to UTF-8 format before being escaped.
>
> This method assumes that stringToEscape has no escape sequences in it.
>
> By default, the string is escaped according to RFC 2396. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is escaped according to RFC 3986 and RFC 3987. See these RFCs for a definition of reserved and unreserved characters.
>
> For more information on IRI support, see the Remarks section for the Uri class.
>

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.