1
1
Cleaning up HTML
2
2
================
3
3
4
- The module ``lxml.html.clean `` provides a ``Cleaner `` class for cleaning up
4
+ The module ``lxml_html_clean `` provides a ``Cleaner `` class for cleaning up
5
5
HTML pages. It supports removing embedded or script content, special tags,
6
6
CSS style annotations and much more.
7
7
8
- Note: the HTML Cleaner in ``lxml.html.clean `` is **not ** considered
8
+ Note: the HTML Cleaner in ``lxml_html_clean `` is **not ** considered
9
9
appropriate **for security sensitive environments **.
10
10
See e.g. `bleach <https://pypi.org/project/bleach/ >`_ for an alternative.
11
11
@@ -47,7 +47,7 @@ To remove the all superfluous content from this unparsed document, use the
47
47
48
48
.. sourcecode :: pycon
49
49
50
- >>> from lxml.html.clean import clean_html
50
+ >>> from lxml_html_clean import clean_html
51
51
>>> print clean_html(html)
52
52
<div><style>/* deleted */</style><body>
53
53
@@ -67,7 +67,7 @@ which content is removed:
67
67
68
68
.. sourcecode :: pycon
69
69
70
- >>> from lxml.html.clean import Cleaner
70
+ >>> from lxml_html_clean import Cleaner
71
71
72
72
>>> cleaner = Cleaner(page_structure = False , links = False )
73
73
>>> print cleaner.clean_html(html)
@@ -121,7 +121,7 @@ cleaned.
121
121
autolink
122
122
--------
123
123
124
- In addition to cleaning up malicious HTML, ``lxml.html.clean ``
124
+ In addition to cleaning up malicious HTML, ``lxml_html_clean ``
125
125
contains functions to do other things to your HTML. This includes
126
126
autolinking::
127
127
0 commit comments