diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2014-02-21 14:46:23 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2014-02-22 13:50:12 +0100 |
| commit | 926e18d7d126fcf7f4b2d25ce4155423ac6e2f90 (patch) | |
| tree | 269e957ca3faa124206e0c724557d8144fbca4a1 /django/utils/text.py | |
| parent | 847171b0d09c7da95cd404bab80f84c890fc5cfd (diff) | |
Deprecated django.utils.text.javascript_quote.
Refs #21725.
Diffstat (limited to 'django/utils/text.py')
| -rw-r--r-- | django/utils/text.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/utils/text.py b/django/utils/text.py index 9e0afad47b..1eee68bb17 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -4,6 +4,7 @@ import re import unicodedata from gzip import GzipFile from io import BytesIO +import warnings from django.utils.encoding import force_text from django.utils.functional import allow_lazy, SimpleLazyObject @@ -327,6 +328,11 @@ ustring_re = re.compile("([\u0080-\uffff])") def javascript_quote(s, quote_double_quotes=False): + msg = ( + "django.utils.text.javascript_quote() is deprecated. " + "Use django.utils.html.escapejs() instead." + ) + warnings.warn(msg, PendingDeprecationWarning, stacklevel=2) def fix(match): return "\\u%04x" % ord(match.group(1)) |
