WebUtility.HtmlDecode replacement in .NET Core

后端 未结 6 556
故里飘歌
故里飘歌 2020-12-09 00:39

I need to decode HTML characters in .NET Core (MVC6). It looks like .NET Core doesn\'t have WebUtility.HtmlDecode function which everybody used for that purpose before. Is t

6条回答
  •  情歌与酒
    2020-12-09 01:08

    HtmlDecode and most of the *Decode methods were not ported to CoreFx. Only the *Encode methods are available.

    Here's what's available today: https://github.com/dotnet/corefx/blob/1dfe38aeb2811fbbd6d4de36d210f060e80d50a6/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/HtmlEncoder.cs

提交回复
热议问题