2 types derived from JavaScriptEncoder
Microsoft.Extensions.WebEncoders (1)
System.Text.Encodings.Web (1)
92 references to JavaScriptEncoder
ConfigurationSchemaGenerator (1)
Diagnostics.EFCore.FunctionalTests (4)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Web (2)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Diagnostics (4)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (4)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.AspNetCore.Hosting (2)
Microsoft.AspNetCore.Http.Connections.Common (1)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.TagHelpers (6)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Microsoft.Extensions.DependencyModel (1)
Microsoft.Extensions.WebEncoders (5)
Microsoft.Extensions.WebEncoders.Tests (10)
Microsoft.ML.AutoML.Tests (1)
System.Text.Encodings.Web (10)
System.Text.Json (24)
System\Text\Json\Writer\JsonWriterHelper.Escaping.cs (12)
55public static int NeedsEscaping(ReadOnlySpan<byte> value, JavaScriptEncoder? encoder)
57return (encoder ?? JavaScriptEncoder.Default).FindFirstCharacterToEncodeUtf8(value);
60public static unsafe int NeedsEscaping(ReadOnlySpan<char> value, JavaScriptEncoder? encoder)
71return (encoder ?? JavaScriptEncoder.Default).FindFirstCharacterToEncode(ptr, value.Length);
82private static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, JavaScriptEncoder encoder, ref int consumed, ref int written, bool isFinalBlock)
102public static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int written)
105public static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int consumed, out int written, bool isFinalBlock = true)
147EscapeString(value, destination, JavaScriptEncoder.Default, ref consumed, ref written, isFinalBlock);
200private static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, JavaScriptEncoder encoder, ref int consumed, ref int written, bool isFinalBlock)
220public static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int written)
223public static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, int indexOfFirstByteToEscape, JavaScriptEncoder? encoder, out int consumed, out int written, bool isFinalBlock = true)
265EscapeString(value, destination, JavaScriptEncoder.Default, ref consumed, ref written, isFinalBlock);