mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed #34600 -- Removed references to bleach in docs.
This commit is contained in:
parent
d3d173425f
commit
b0a6cc7f57
@ -2507,10 +2507,7 @@ output will be ``"Joel is a slug"``.
|
|||||||
Note that ``striptags`` doesn't give any guarantee about its output being
|
Note that ``striptags`` doesn't give any guarantee about its output being
|
||||||
HTML safe, particularly with non valid HTML input. So **NEVER** apply the
|
HTML safe, particularly with non valid HTML input. So **NEVER** apply the
|
||||||
``safe`` filter to a ``striptags`` output. If you are looking for something
|
``safe`` filter to a ``striptags`` output. If you are looking for something
|
||||||
more robust, you can use the ``bleach`` Python library, notably its
|
more robust, consider using a third-party HTML sanitizing tool.
|
||||||
`clean`_ method.
|
|
||||||
|
|
||||||
.. _clean: https://bleach.readthedocs.io/en/latest/clean.html
|
|
||||||
|
|
||||||
.. templatefilter:: time
|
.. templatefilter:: time
|
||||||
|
|
||||||
|
@ -698,8 +698,8 @@ escaping HTML.
|
|||||||
If ``value`` is ``"<b>Joel</b> <button>is</button> a <span>slug</span>"``
|
If ``value`` is ``"<b>Joel</b> <button>is</button> a <span>slug</span>"``
|
||||||
the return value will be ``"Joel is a slug"``.
|
the return value will be ``"Joel is a slug"``.
|
||||||
|
|
||||||
If you are looking for a more robust solution, take a look at the
|
If you are looking for a more robust solution, consider using a third-party
|
||||||
:pypi:`bleach` Python package.
|
HTML sanitizing tool.
|
||||||
|
|
||||||
.. function:: html_safe()
|
.. function:: html_safe()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user