Ejemplo n.º 1
0
        public void TestCleaning()
        {
            var writer = new HtmlWriter();
            var clean = new HtmlCleaner(writer);
            TagParser.Parse(html, clean);

            Assert.AreEqual(htmlCleaned, writer.ToString());
        }
Ejemplo n.º 2
0
 public static string CleanToPlain(string raw)
 {
     var w = new StringWriter();
     var writer = new PlainWriter(w);
     var cleaner = new HtmlCleaner(writer);
     TagParser.Parse(raw, cleaner);
     return w.GetStringBuilder().ToString();
 }