django-json-widget
django-json-widget copied to clipboard
</script> is a problem
- django-json-widget version: 1.1.1
- Django version: 4.2.3
- Python version: 3.11
- Operating System: N/A
Description
I tried to show a json widget. But it was broken. Then I discovered that it was one of the fields inside my json that had the content </script>
. Something like:
{"html": "<p>A paragraph</p><script>const a = 10;</script>"}
The issue is this: The </script>
makes the script used by django-json-widget end immediately there. So the reminder of the json is rendered into the browser and the json widget throws an error in the JavaScript developer console.