-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Package version
4.47.3
Node version
20.16
Platform
mac
What steps will reproduce the bug?
allowHTML: true
needToSanitizeHtml: falseIf 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.
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:
allowHTML: true
needToSanitizeHtml: true
sanitizeOptions:
allowedTags:
- scriptBut this does't work
Metadata
Metadata
Assignees
Labels
No labels