Skip to content

Commit

Permalink
comment DOMpurify
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain committed Mar 1, 2024
1 parent 32ef811 commit ae9d272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renderhtml/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>Render sanitized HTML from a cell</title>
<script src="https://docs.getgrist.com/grist-plugin-api.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/purify.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/purify.min.js"></script>
<style>
html, body, textarea {
width: 100%;
Expand Down Expand Up @@ -33,7 +33,7 @@
if (!content) {
el.style.display = 'none';
} else {
el.innerHTML = DOMPurify.sanitize(content, {ADD_TAGS, ADD_ATTR});
// el.innerHTML = DOMPurify.sanitize(content, {ADD_TAGS, ADD_ATTR});
// If we are allowing scripts, let them execute, which doesn't
// normally happen when adding script elements using innerHTML.
if (ADD_TAGS?.includes("script")) {
Expand Down

0 comments on commit ae9d272

Please sign in to comment.