Skip to content

Commit 923d2bf

Browse files
committed
🚨 Sanitize input text in comment (#1526)
1 parent 716f376 commit 923d2bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/components/WorkBookTasks/WorkBookTasksTable.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script lang="ts">
2+
import xss from 'xss';
3+
24
import {
35
Label,
46
Table,
@@ -33,7 +35,7 @@
3335
const target = event.target as HTMLElement;
3436
3537
if (target && target instanceof HTMLElement) {
36-
const newComment = target.innerText as string;
38+
const newComment = xss(target.innerText as string);
3739
3840
// HACK: 代替手段として、50文字以下の場合のみ更新
3941
if (newComment.length <= 50) {

0 commit comments

Comments
 (0)