feat: sanitize reply content

This commit is contained in:
Ayo 2023-06-01 09:29:26 +02:00
parent 2e06e34a7b
commit e71dbf15f3

View file

@ -62,7 +62,8 @@ function createRepliesBlock(replies, heading) {
).toLocaleDateString()}</a><div class="clear-both"></div>`; ).toLocaleDateString()}</a><div class="clear-both"></div>`;
const card = document.createElement("div"); const card = document.createElement("div");
card.className = "reply-card"; card.className = "reply-card";
card.innerHTML = reply.content.html; const sanitizer = new Sanitizer();
card.setHTML(reply.content.html, { sanitizer });
card.insertBefore(author, card.firstChild); card.insertBefore(author, card.firstChild);
cell.appendChild(card); cell.appendChild(card);
repliesTable.append(row); repliesTable.append(row);