Sto usando seguente metodo per mettere a nudo tutta l'HTML dalla stringa:HTMLagilitypack non rimuove tutti i tag html Come posso risolvere questo problema in modo efficiente?
public static string StripHtmlTags(string html)
{
if (String.IsNullOrEmpty(html)) return "";
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(html);
return doc.DocumentNode.InnerText;
}
ma sembra ignorare questo tag seguente: […]
Così la stringa restituisce decidessino:
> A hungry thief who stole a rack of pork ribs from a grocery store has
> been sentenced to spend 50 years in prison. Willie Smith Ward felt the
> full force of the law after being convicted of the crime in Waco,
> Texas, on Wednesday. The 43-year-old may feel slightly aggrieved over
> the severity of the […]
Come può Mi assicuro che questo tipo di tag venga rimosso?
Qualsiasi tipo di aiuto è apprezzato, grazie.
'' … non è un tag HTML. Un tag ha parentesi angolari. Questa è un'entità codificata. – jessehouwing