dotnet / dotnet/aspnetcore

Should IHtmlAsyncContent.WriteToAsync use a custom encoder?

Open
#54,976 0 comments 0 reactions 0 assignees View on GitHub
area-mvc
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

https://github.com/dotnet/aspnetcore/blob/main/src/Html.Abstractions/src/IHtmlAsyncContent.cs

It's a public type which was added for Razor components and it is used in `ViewBuffer`

https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.ViewFeatures/src/Buffers/ViewBuffer.cs#L235-L240

The current default implementation uses `HtmlEncoder.Default` so the one passed to `WriteToAsync` is not taken into account.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.