Exemple #1
0
 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!"
     )
Exemple #2
0
 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!"
     )
Exemple #3
0
 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")
Exemple #4
0
def clean_html(markup):
    """Filter for removing most HTML tags from some markup."""
    return util.clean_html(markup)
Exemple #5
0
 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")
Exemple #6
0
def clean_html(markup):
    """Filter for removing most HTML tags from some markup."""
    return util.clean_html(markup)