Esempio n. 1
0
        public void StripTags_TextWithTagsNotClosed_TagsRemoved()
        {
            string item = "<p></p></a></code></i><li><ul><ol></li><br /><br/>";

            var result = HtmlCleaner.StripTags(item);

            Assert.Equal(string.Empty, result);
        }
Esempio n. 2
0
        public void StripTags_TextWithoutTags_TagsNotRemoved()
        {
            string item = "some text without tags";

            var result = HtmlCleaner.StripTags(item);

            Assert.Equal(item, result);
        }
Esempio n. 3
0
        public void StripTags_TextWithTags_TagsRemoved()
        {
            string item = "<p>some</p><b>text</b><strong>with</strong><a href=\"#\">tags</a><br /><br/>";

            var result = HtmlCleaner.StripTags(item);

            Assert.Equal("sometextwithtags", result);
        }