Ejemplo n.º 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!"
     )
Ejemplo n.º 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!"
     )
Ejemplo n.º 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")
Ejemplo n.º 4
0
def clean_html(markup):
    """Filter for removing most HTML tags from some markup."""
    return util.clean_html(markup)
Ejemplo n.º 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")
Ejemplo n.º 6
0
def clean_html(markup):
    """Filter for removing most HTML tags from some markup."""
    return util.clean_html(markup)