Skip to content

Commit 3065325

Browse files
committed
Fix allowedAttributes in sanitizeHtml usage
1 parent 76644d8 commit 3065325

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/comment-widget/src/base-comment-item.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ export class BaseCommentItem extends LitElement {
124124
<div class="item-content mt-2.5 space-y-2.5 content">
125125
<slot name="pre-content"></slot>${unsafeHTML(
126126
sanitizeHtml(this.content, {
127-
allowedAttributes: { code: ['class'] },
127+
allowedAttributes: {
128+
...sanitizeHtml.defaults.allowedAttributes,
129+
code: ['class'],
130+
},
128131
})
129132
)}
130133
</div>

0 commit comments

Comments
 (0)