mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
[3.0.x] Refs #31493 -- Replaced var with const/let in documentation JS.
Backport of 2afa61e7d9
from master
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
This commit is contained in:
parent
453a5bf302
commit
af2e95b0fa
4 changed files with 33 additions and 24 deletions
|
@ -1816,7 +1816,7 @@ The resulting data can be accessed in JavaScript like this:
|
|||
|
||||
.. code-block:: javascript
|
||||
|
||||
var value = JSON.parse(document.getElementById('hello-data').textContent);
|
||||
const value = JSON.parse(document.getElementById('hello-data').textContent);
|
||||
|
||||
XSS attacks are mitigated by escaping the characters "<", ">" and "&". For
|
||||
example if ``value`` is ``{'hello': 'world</script>&'}``, the output is:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue