diff --git a/bleach/linkifier.py b/bleach/linkifier.py index 183eb5ba..b5a3041e 100644 --- a/bleach/linkifier.py +++ b/bleach/linkifier.py @@ -122,7 +122,8 @@ def __init__( :arg set skip_tags: set of tags that you don't want to linkify the contents of; for example, you could set this to ``{'pre'}`` to skip - linkifying contents of ``pre`` tags + linkifying contents of ``pre`` tags; ``None`` means you don't + want linkify to skip any tags :arg bool parse_email: whether or not to linkify email addresses diff --git a/tests/test_clean.py b/tests/test_clean.py index 10a91fd0..73946a1f 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -29,7 +29,7 @@ def test_clean_idempotent(data): def test_clean_idempotent_img(): - tags = ["img"] + tags = {"img"} dirty = '' assert clean(clean(dirty, tags=tags), tags=tags) == clean(dirty, tags=tags) @@ -254,21 +254,21 @@ def test_character_entities_handling(text, expected): # a tag is disallowed, so it's stripped ( '

link text

', - {"tags": ["p"]}, + {"tags": {"p"}}, "

link text

", ), # Test nested disallowed tag ( "

multiply nested text

", - {"tags": ["p"]}, + {"tags": {"p"}}, "

multiply nested text

", ), # (#271) - ("