Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

</script> is a problem #80

Open
johanneswilm opened this issue Nov 21, 2023 · 0 comments
Open

</script> is a problem #80

johanneswilm opened this issue Nov 21, 2023 · 0 comments

Comments

@johanneswilm
Copy link

johanneswilm commented Nov 21, 2023

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant