Skip to content
This repository has been archived by the owner on Dec 8, 2018. It is now read-only.

Diagnostics should register encoders in startup or use default values all the time #234

Closed
pranavkm opened this issue Dec 23, 2015 · 1 comment
Assignees
Milestone

Comments

@pranavkm
Copy link
Contributor

See here - https://github.com/aspnet/Diagnostics/blob/dev/src/Microsoft.AspNet.Diagnostics/Views/BaseView.cs#L69 where the body of the extension method is:

public static HtmlEncoder GetHtmlEncoder(this IServiceProvider serviceProvider)
{
    return (HtmlEncoder)serviceProvider?.GetService(typeof(HtmlEncoder)) ?? HtmlEncoder.Default;
}

We should either require registering encoders in the service container or use *Encoder.Default all the time. I'd prefer the latter since these are diagnostic pages and are not meant for production views.

@Eilon Eilon added this to the 1.0.0-rc2 milestone Dec 29, 2015
@Eilon
Copy link
Member

Eilon commented Dec 29, 2015

I'm fine just using the default everywhere in these.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants