Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 1.27 KB

061 WebUtility.HtmlDecode no longer decodes invalid input sequences.md

File metadata and controls

34 lines (24 loc) · 1.27 KB

61: WebUtility.HtmlDecode no longer decodes invalid input sequences

Scope

Minor

Version Introduced

4.5

Source Analyzer Status

Planned

Change Description

By default, decoding methods no longer decode an invalid input sequence into an invalid UTF-16 string. Instead, they return the original input.

  • Quirked
  • Build-time break

Recommended Action

The change in decoder output should matter only if you store binary data instead of UTF-16 data in strings. To explicitly control this behavior, set the aspnet:AllowRelaxedUnicodeDecoding attribute of the appSettings element to true to enable legacy behavior or to false to enable the current behavior.

Affected APIs

  • M:System.Net.WebUtility.HtmlDecode(System.String)
  • M:System.Net.WebUtility.HtmlDecode(System.String,System.IO.TextWriter)
  • M:System.Net.WebUtility.UrlDecode(System.String)

Category

ASP.NET

More information