We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If json contains the following string <!-- anything here <script> it will comment out the rest of HTML braking the website.
<!-- anything here <script>
Adding the :html_safe to encode/2 doesn't escape this sequence.
:html_safe
encode/2
https://hexdocs.pm/jason/Jason.html#encode/2
<script> const a = "<!-- <script>" </script> <h1>This is commented out</h1>
Because of the HTML Spec https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
The text was updated successfully, but these errors were encountered:
188e66b
No branches or pull requests
If json contains the following string
<!-- anything here <script>
it will comment out the rest of HTML braking the website.The problem?
Adding the
:html_safe
toencode/2
doesn't escape this sequence.https://hexdocs.pm/jason/Jason.html#encode/2
Reproduction
Why is that?
Because of the HTML Spec https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
The text was updated successfully, but these errors were encountered: