Ejemplo n.º 1
0
        /// <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));
        }
Ejemplo n.º 2
0
 /// <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);
 }