예제 #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));
        }
예제 #2
0
파일: Parser.cs 프로젝트: fengweijp/NSoup
 /// <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);
 }