diff options
| author | Adam Johnson <me@adamj.eu> | 2020-06-24 11:41:10 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2020-06-24 12:20:57 +0200 |
| commit | 2afa61e7d99b2ff2656dc64b6e28db88baf786a4 (patch) | |
| tree | 4aa52915ada6d6637fcaa0ec4333e688dc8dadc9 /docs/ref/templates | |
| parent | 30e59705fc3e3e9e8370b965af794ad6173bf92b (diff) | |
Refs #31493 -- Replaced var with const/let in documentation JS.
Diffstat (limited to 'docs/ref/templates')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index a8e8ad98f8..54258155bd 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1830,7 +1830,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: |
