mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #27753 -- Favored SafeString over SafeText.
This commit is contained in:
parent
d55e882927
commit
77d25dbd0f
8 changed files with 25 additions and 31 deletions
|
@ -200,12 +200,12 @@ passed around inside the template code:
|
|||
to be interpreted as-is on the client side.
|
||||
|
||||
Internally, these strings are of type
|
||||
:class:`~django.utils.safestring.SafeText`. You can test for them
|
||||
:class:`~django.utils.safestring.SafeString`. You can test for them
|
||||
using code like::
|
||||
|
||||
from django.utils.safestring import SafeText
|
||||
from django.utils.safestring import SafeString
|
||||
|
||||
if isinstance(value, SafeText):
|
||||
if isinstance(value, SafeString):
|
||||
# Do something with the "safe" string.
|
||||
...
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue