feat: 网页中文乱码

This commit is contained in:
Argo Zhang 2019-09-29 13:14:23 +08:00
parent a86e717ced
commit 9a2188674d
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,8 @@ using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Text.Encodings.Web;
using System.Text.Unicode;
namespace Bootstrap.Admin
{
@ -43,7 +45,7 @@ namespace Bootstrap.Admin
/// <param name="services"></param>
public void ConfigureServices(IServiceCollection services)
{
//services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.