summaryrefslogtreecommitdiff
path: root/docs/ref/templates
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/templates')
-rw-r--r--docs/ref/templates/builtins.txt2
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>&amp;'}``, the output is: