diff options
| author | Tim Graham <timograham@gmail.com> | 2016-05-10 12:46:47 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-10 12:46:47 -0400 |
| commit | 2f0e0eee450775a71ac3eb42707dcd970ede42c8 (patch) | |
| tree | 26149ef4a5feb6317f9b52c79239ca524a5bded4 /django/utils | |
| parent | c3e108694966f045adcc0ba11133a2b3bf238770 (diff) | |
Fixed #24046 -- Deprecated the "escape" half of utils.safestring.
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/safestring.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/utils/safestring.py b/django/utils/safestring.py index 3d3bf1b62a..24a29e0747 100644 --- a/django/utils/safestring.py +++ b/django/utils/safestring.py @@ -4,7 +4,10 @@ without further escaping in HTML. Marking something as a "safe 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. """ +import warnings + from django.utils import six +from django.utils.deprecation import RemovedInDjango20Warning from django.utils.functional import Promise, curry @@ -138,6 +141,7 @@ def mark_for_escaping(s): Can be called multiple times on a single string (the resulting escaping is only applied once). """ + warnings.warn('mark_for_escaping() is deprecated.', RemovedInDjango20Warning) if hasattr(s, '__html__') or isinstance(s, EscapeData): return s if isinstance(s, bytes) or (isinstance(s, Promise) and s._delegate_bytes): |
