Skip to content

Commit

Permalink
Merge in 'release/8.0' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Jan 17, 2024
2 parents a628729 + cde2430 commit 4855269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public partial class StaticHtmlRenderer
string.Empty,
typeof(FormMappingContext));

private static readonly TextEncoder _javaScriptEncoder = JavaScriptEncoder.Default;
private TextEncoder _htmlEncoder = HtmlEncoder.Default;
private readonly TextEncoder _javaScriptEncoder;
private TextEncoder _htmlEncoder;
private string? _closestSelectValueAsString;

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/Components/Web/src/HtmlRendering/StaticHtmlRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Diagnostics.CodeAnalysis;
using System.Runtime.ExceptionServices;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.HtmlRendering;
Expand Down Expand Up @@ -30,6 +31,8 @@ public StaticHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory logge
: base(serviceProvider, loggerFactory)
{
_navigationManager = serviceProvider.GetService<NavigationManager>();
_htmlEncoder = serviceProvider.GetService<HtmlEncoder>() ?? HtmlEncoder.Default;
_javaScriptEncoder = serviceProvider.GetService<JavaScriptEncoder>() ?? JavaScriptEncoder.Default;
}

/// <inheritdoc/>
Expand Down

0 comments on commit 4855269

Please sign in to comment.