/// <summary> /// Utility method to unescape HTML entities from a string /// </summary> /// <param name="s">HTML escaped string</param> /// <param name="inAttribute">If the string is to be escaped in strict mode (as attributes are)</param> /// <returns>An unescaped string</returns> public static string UnescapeEntities(string s, bool inAttribute) { Tokeniser tokeniser = new Tokeniser(new CharacterReader(s), ParseErrorList.NoTracking()); return(tokeniser.UnescapeEntities(inAttribute)); }
/// <summary> /// Utility method to unescape HTML entities from a string /// </summary> /// <param name="s">HTML escaped string</param> /// <param name="inAttribute">If the string is to be escaped in strict mode (as attributes are)</param> /// <returns>An unescaped string</returns> public static string UnescapeEntities(string s, bool inAttribute) { Tokeniser tokeniser = new Tokeniser(new CharacterReader(s), ParseErrorList.NoTracking()); return tokeniser.UnescapeEntities(inAttribute); }