Skip to content

Commit

Permalink
add tests for void tags #488
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Guthe authored and g-k committed Sep 16, 2020
1 parent 17dceaf commit 29a6f72
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/test_clean.py
Expand Up @@ -771,6 +771,45 @@ def test_nonexistent_namespace():
assert clean('<d {c}>') == '&lt;d {c}&gt;'


@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",
Expand Down

0 comments on commit 29a6f72

Please sign in to comment.