mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #10107 -- Allowed using mark_safe() as a decorator.
Thanks ArcTanSusan for the initial patch.
This commit is contained in:
parent
5e3f4c2e53
commit
be729b6120
5 changed files with 53 additions and 2 deletions
|
@ -832,6 +832,8 @@ appropriate entities.
|
|||
|
||||
Can be called multiple times on a single string.
|
||||
|
||||
Can also be used as a decorator.
|
||||
|
||||
For building up fragments of HTML, you should normally be using
|
||||
:func:`django.utils.html.format_html` instead.
|
||||
|
||||
|
@ -846,6 +848,10 @@ appropriate entities.
|
|||
>>> type(mystr)
|
||||
<type 'str'>
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Added support for decorator usage.
|
||||
|
||||
.. function:: mark_for_escaping(s)
|
||||
|
||||
.. deprecated:: 1.10
|
||||
|
|
|
@ -202,7 +202,7 @@ Signals
|
|||
Templates
|
||||
~~~~~~~~~
|
||||
|
||||
* ...
|
||||
* :meth:`~django.utils.safestring.mark_safe` can now be used as a decorator.
|
||||
|
||||
Tests
|
||||
~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue