1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Removed fix_ampersands template filter per deprecation timeline.

Also removed related utility functions:
* django.utils.html.fix_ampersands
* django.utils.html.clean_html
This commit is contained in:
Tim Graham
2014-03-21 08:32:01 -04:00
parent 99339c77f6
commit 8b81dee60c
7 changed files with 3 additions and 144 deletions

View File

@@ -1572,35 +1572,6 @@ For example::
If ``value`` is the list ``['a', 'b', 'c']``, the output will be ``'a'``.
.. templatefilter:: fix_ampersands
fix_ampersands
^^^^^^^^^^^^^^
.. note::
This is rarely useful as ampersands are automatically escaped. See
:tfilter:`escape` for more information.
.. deprecated:: 1.7
This filter has been deprecated and will be removed in Django 1.8.
Replaces ampersands with ``&`` entities.
For example::
{{ value|fix_ampersands }}
If ``value`` is ``Tom & Jerry``, the output will be ``Tom & Jerry``.
However, ampersands used in named entities and numeric character references
will not be replaced. For example, if ``value`` is ``Café``, the output
will *not* be ``Café`` but remain ``Café``. This means that
in some edge cases, such as acronyms followed by semicolons, this filter will
not replace ampersands that need replacing. For example, if ``value`` is
``Contact the R&D;``, the output will remain unchanged because ``&D;``
resembles a named entity.
.. templatefilter:: floatformat
floatformat