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); }
public void StripTags_TextWithoutTags_TagsNotRemoved() { string item = "some text without tags"; var result = HtmlCleaner.StripTags(item); Assert.Equal(item, result); }
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); }