How can I decode HTML characters in C#?

前端 未结 10 2033
夕颜
夕颜 2020-11-22 03:38

I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?

10条回答
  •  旧巷少年郎
    2020-11-22 04:02

    It is also worth mentioning that if you're using HtmlAgilityPack like I was, you should use HtmlAgilityPack.HtmlEntity.DeEntitize(). It takes a string and returns a string.

提交回复
热议问题