dotnet / dotnet/dotnet-api-docs
Uri.EscapeUriString/EscapeDataString don't do the same thing, yet both have the same remarks section
- 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
Assessment
This issue has not been assessed yet.