dotnet/Documentation/compatibility/system_uri-escaping-now-sup...

1.4 KiB

System.Uri escaping now supports RFC 3986

Scope

Minor

Version Introduced

4.5

Source Analyzer Status

Available

Change Description

URI escaping has changed in .NET 4.5 to support RFC 3986. Specific changes include:

  • Update applications to not rely on xref:System.Uri.UnescapeDataString(System.String)?displayProperty=name to throw in the case of an invalid escape sequence. Such sequences must be detected directly now.
  • Similarly, expect that Escaped and Unescaped URI and Data strings may vary from .NET 4.0 and .NET 4.5 and should not be compared across .NET versions directly. Instead, they should be parsed and normalized in a single .NET version before any comparisons are made.

Affected APIs

  • M:System.Uri.EscapeDataString(System.String)
  • M:System.Uri.EscapeUriString(System.String)
  • M:System.Uri.UnescapeDataString(System.String)

Category

Core