JavaScriptEncoder.UnsafeRelaxedJsonEscaping Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a built-in JavaScript encoder instance that is less strict about what is encoded.
public:
static property System::Text::Encodings::Web::JavaScriptEncoder ^ UnsafeRelaxedJsonEscaping { System::Text::Encodings::Web::JavaScriptEncoder ^ get(); };
public static System.Text.Encodings.Web.JavaScriptEncoder UnsafeRelaxedJsonEscaping { get; }
static member UnsafeRelaxedJsonEscaping : System.Text.Encodings.Web.JavaScriptEncoder
Public Shared ReadOnly Property UnsafeRelaxedJsonEscaping As JavaScriptEncoder
A JavaScript encoder instance.
Unlike the Default encoder, this encoder instance does not escape HTML-sensitive characters such as <, >, &. As a result, it must be used cautiously; for example, it can be used if the output data is within a response whose content-type is known with a charset set to UTF-8.
Unlike the Default encoding, the quotation mark is encoded as \" rather than \u0022.
Unlike the Default encoding (which only allows UnicodeRanges.BasicLatin), using this encoder instance allows UnicodeRanges.All to go through unescaped.
Unlike the Default encoder, this encoder instance allows some other characters (such as '+') to go through unescaped and therefore must be used cautiously.
For more information about why this could be unsafe, see Serialize all characters.
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: