Here is my script for testing purposes
<script>
var json = {
"html": "<h3>COVID-19 Visitor Declaration</h3><script></script>"
};
</script>
That will throw a javascript error
Uncaught SyntaxError: Invalid or unexpected token
Now if I change the script to something else the error goes away
<script>
var json = {
"html": "<h3>COVID-19 Visitor Declaration</h3><scripta></scripta>"
};
</script>
How can I let that script tag go through as valid JSON, guessing this is something to do with security.