HtmlAgilityPack and HtmlDecode
See the question and my original answer on StackOverflowThe Html Agility Pack is equiped with a utility class called HtmlEntity
. It has a static method with the following signature:
/// <summary>
/// Replace known entities by characters.
/// </summary>
/// <param name="text">The source text.</param>
/// <returns>The result text.</returns>
public static string DeEntitize(string text)
It supports well-known entities (like
) and encoded characters such as '
as well.