mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
[py3] Ported django.utils.safestring.
Backwards compatibility aliases were created under Python 2.
This commit is contained in:
parent
e41c308014
commit
547b181046
8 changed files with 82 additions and 54 deletions
|
@ -560,15 +560,29 @@ string" means that the producer of the string has already turned characters
|
|||
that should not be interpreted by the HTML engine (e.g. '<') into the
|
||||
appropriate entities.
|
||||
|
||||
.. class:: SafeBytes
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
A :class:`bytes` subclass that has been specifically marked as "safe"
|
||||
(requires no further escaping) for HTML output purposes.
|
||||
|
||||
.. class:: SafeString
|
||||
|
||||
A string subclass that has been specifically marked as "safe" (requires no
|
||||
further escaping) for HTML output purposes.
|
||||
A :class:`str` subclass that has been specifically marked as "safe"
|
||||
(requires no further escaping) for HTML output purposes. This is
|
||||
:class:`SafeBytes` on Python 2 and :class:`SafeText` on Python 3.
|
||||
|
||||
.. class:: SafeText
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
A :class:`str` (in Python 3) or :class:`unicode` (in Python 2) subclass
|
||||
that has been specifically marked as "safe" for HTML output purposes.
|
||||
|
||||
.. class:: SafeUnicode
|
||||
|
||||
A unicode subclass that has been specifically marked as "safe" for HTML
|
||||
output purposes.
|
||||
Historical name of :class:`SafeText`. Only available under Python 2.
|
||||
|
||||
.. function:: mark_safe(s)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue