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 /docs | |
| parent | 847171b0d09c7da95cd404bab80f84c890fc5cfd (diff) | |
Deprecated django.utils.text.javascript_quote.
Refs #21725.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 2 | ||||
| -rw-r--r-- | docs/releases/1.7.txt | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 057c6dd3fe..fdae4ea540 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -119,6 +119,8 @@ details on these changes. * ``ssi`` and ``url`` template tags will be removed from the ``future`` template tag library (used during the 1.3/1.4 deprecation period). +* ``django.utils.text.javascript_quote`` will be removed. + .. _deprecation-removed-in-1.8: 1.8 diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index fc1f0f81cd..e3144f3d29 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -1374,3 +1374,15 @@ Django 1.3 introduced ``{% load ssi from future %}`` and :ttag:`ssi` and :ttag:`url` template tags. This syntax is now deprecated and will be removed in Django 1.9. You can simply remove the ``{% load ... from future %}`` tags. + +``django.utils.text.javascript_quote`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``javascript_quote()`` was an undocumented function present in ``django.utils.text``. +It was used internally in the :ref:`javascript_catalog view <javascript_catalog-view>` +whose implementation was changed to make use of ``json.dumps()`` instead. +If you were relying on this function to provide safe output from untrusted +strings, you should use ``django.utils.html.escapejs`` or the +:tfilter:`escapejs` template filter. +If all you need is to generate valid javascript strings, you can simply use +``json.dumps()``. |
