Skip to content

Commit bbebb8d

Browse files
committed
fixup! fixup! Deprecate the sanitizer and recommend Bleach
1 parent 254b910 commit bbebb8d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

html5lib/filters/sanitizer.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""Deprecated from html5lib 1.1.
22
3-
See `here <https://github.com/html5lib/html5lib-python/issues/443>`_ for information about its
4-
deprecation; `Bleach <https://github.com/mozilla/bleach>`_ is recommended as a replacement. Please
5-
let us know in the aforementioned issue if Bleach is unsuitable for your needs.
3+
See `here <https://github.com/html5lib/html5lib-python/issues/443>`_ for
4+
information about its deprecation; `Bleach <https://github.com/mozilla/bleach>`_
5+
is recommended as a replacement. Please let us know in the aforementioned issue
6+
if Bleach is unsuitable for your needs.
67
78
"""
89
from __future__ import absolute_import, division, unicode_literals
@@ -19,13 +20,13 @@
1920
__all__ = ["Filter"]
2021

2122

22-
__deprecation_msg = (
23+
_deprecation_msg = (
2324
"html5lib's sanitizer is deprecated; see " +
2425
"https://github.com/html5lib/html5lib-python/issues/443 and please let " +
2526
"us know if Bleach is unsuitable for your needs"
2627
)
2728

28-
warnings.warn(__deprecation_msg, DeprecationWarning)
29+
warnings.warn(_deprecation_msg, DeprecationWarning)
2930

3031
allowed_elements = frozenset((
3132
(namespaces['html'], 'a'),
@@ -767,7 +768,7 @@ def __init__(self,
767768
"""
768769
super(Filter, self).__init__(source)
769770

770-
warnings.warn(__deprecation_msg, DeprecationWarning)
771+
warnings.warn(_deprecation_msg, DeprecationWarning)
771772

772773
self.allowed_elements = allowed_elements
773774
self.allowed_attributes = allowed_attributes

0 commit comments

Comments
 (0)