def test_clean_html_keeps_links(self): dirty_markup = ( "<div v-if=\"foo\" class=\"blue\">Visit <a href=\"https://lutris.net\">Lutris.net</a> </div>" "<br/><p>it's full of <blink>fun</blink>!</p>") self.assertEqual( clean_html(dirty_markup), "Visit <a href=\"https://lutris.net\">Lutris.net</a> it's full of fun!" )
def test_clean_html_keeps_links(self): dirty_markup = ( "<div v-if=\"foo\" class=\"blue\">Visit " "<a href=\"https://lutris.net\">Lutris.net</a> </div>" "<br/><p>it's full of <blink>fun</blink>!</p>" ) self.assertEqual( clean_html(dirty_markup), "Visit <a href=\"https://lutris.net\">Lutris.net</a> it's full of fun!" )
def test_clean_html(self): dirty_markup = "This is <b> a string </b> with <span>tags</span>" self.assertEqual(clean_html(dirty_markup), "This is <b> a string </b> with tags")
def clean_html(markup): """Filter for removing most HTML tags from some markup.""" return util.clean_html(markup)
def test_clean_html(self): dirty_markup = "This is <b> a string </b> with <span>tags</span>" self.assertEqual(clean_html(dirty_markup), "This is <b> a string </b> with tags")
def clean_html(markup): """Filter for removing most HTML tags from some markup.""" return util.clean_html(markup)