blob: 043978668b1f691350612c9e5a6261e43575936b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
.. Bleach documentation master file, created by
sphinx-quickstart on Fri May 11 21:11:39 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Bleach's documentation!
==================================
Bleach is a whitelist-based HTML sanitization and text linkification library.
It is designed to take untrusted user input with *some* HTML.
Because Bleach uses html5lib_ to parse document fragments the same way browsers
do, it is extremely resilient to unknown attacks, much more so than
regular-expression-based sanitizers.
Bleach's ``linkify`` function is highly configurable and can be used to find,
edit, and filter links most other auto-linkers can't.
The version of bleach on GitHub_ is always the most up-to-date and the
``master`` branch should always work.
Installing Bleach
=================
Bleach is available on PyPI_, so you can install it with ``pip``::
$ pip install bleach
Or with ``easy_install``::
$ easy_install bleach
Or by cloning the repo from GitHub_::
$ git clone git://github.com/jsocol/bleach.git
Then install it by running::
$ python setup.py install
Contents:
=========
.. toctree::
:maxdepth: 2
clean
linkify
goals
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. _html5lib: https://github.com/html5lib/html5lib-python
.. _GitHub: https://github.com/jsocol/bleach
.. _PyPI: https://pypi.python.org/pypi/bleach
|