更新时间:2023-11-29 15:21:28
您可以使用 HtmlAgilityPack
,像这样的东西:
You can use HtmlAgilityPack
, something like this:
HtmlDocument document = new HtmlDocument();
document.LoadHtml(Model.ContentField.Value);
string textValue = HtmlEntity.DeEntitize(document.DocumentNode.InnerText);
bool isEmpty = String.IsNullOrWhiteSpace(textValue);