diff --git a/tests/test_clean.py b/tests/test_clean.py index 133cd822..d5ca41cf 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -771,6 +771,45 @@ def test_nonexistent_namespace(): assert clean('') == '<d {c}>' +@pytest.mark.parametrize( + "tag", + [ + "area", + "base", + "br", + "embed", + "hr", + "img", + "input", + pytest.param( + "keygen", + marks=pytest.mark.xfail( + reason="https://github.com/mozilla/bleach/issues/488" + ), + ), + "link", + "meta", + "param", + "source", + pytest.param( + "menuitem", + marks=pytest.mark.xfail( + reason="https://github.com/mozilla/bleach/issues/488" + ), + ), + "track", + pytest.param( + "wbr", + marks=pytest.mark.xfail( + reason="https://github.com/mozilla/bleach/issues/488" + ), + ), + ], +) +def test_self_closing_tags_self_close(tag): + assert clean("<%s>" % tag, tags=[tag]) == "<%s>" % tag + + # tags that get content passed through (i.e. parsed with parseRCDataRawtext) _raw_tags = [ "title",