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
4.47.3
20.16
mac
allowHTML: true needToSanitizeHtml: false
If you use html in a page + allow inserting script, the page becomes broken. You insert all the content into the script tag at the end of the document
# Example 1 <script>bla()</script>
After build this script will be inside another script in the end of the page
<script type="application/javascript"> window.STATIC_CONTENT = true window.__DATA__ = {"data": ...., html: "...<script>bla()</script>" </script>
when the browser parser encounters another script tag inside, it thinks that the first one has ended.
For documentation it is often important to include examples, I would like to be able to include a script tag
Broken page
I also couldn't find what format the sanitizer options are (sanitizeOptions). The documentation just says Object. I think it should be like this:
allowHTML: true needToSanitizeHtml: true sanitizeOptions: allowedTags: - script
But this does't work
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Package version
4.47.3
Node version
20.16
Platform
mac
What steps will reproduce the bug?
If you use html in a page + allow inserting script, the page becomes broken. You insert all the content into the script tag at the end of the document
After build this script will be inside another script in the end of the page
when the browser parser encounters another script tag inside, it thinks that the first one has ended.
What is the expected behavior?
For documentation it is often important to include examples, I would like to be able to include a script tag
What do you see instead?
Broken page
Additional information
I also couldn't find what format the sanitizer options are (sanitizeOptions). The documentation just says Object.
I think it should be like this:
But this does't work
The text was updated successfully, but these errors were encountered: