mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user