From 02cd16a7a04529c726e5bb5a13d5979119f25c7d Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 22 Jun 2018 09:36:17 -0400 Subject: [PATCH] Refs #17419 -- Removed IE8 support in json_script example. --- docs/ref/templates/builtins.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index a3e429d1c4b..b77b6097e19 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1814,8 +1814,7 @@ The resulting data can be accessed in JavaScript like this: .. code-block:: javascript - var el = document.getElementById('hello-data'); - var value = JSON.parse(el.textContent || el.innerText); + var value = JSON.parse(document.getElementById('hello-data').textContent); XSS attacks are mitigated by escaping the characters "<", ">" and "&". For example if ``value`` is ``{'hello': 'world&'}``, the output is: