Skip to content

Commit

Permalink
🚨 Sanitize input text in comment (#1526)
Browse files Browse the repository at this point in the history
  • Loading branch information
KATO-Hiro committed Dec 3, 2024
1 parent 716f376 commit 923d2bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/components/WorkBookTasks/WorkBookTasksTable.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import xss from 'xss';
import {
Label,
Table,
Expand Down Expand Up @@ -33,7 +35,7 @@
const target = event.target as HTMLElement;
if (target && target instanceof HTMLElement) {
const newComment = target.innerText as string;
const newComment = xss(target.innerText as string);
// HACK: 代替手段として、50文字以下の場合のみ更新
if (newComment.length <= 50) {
Expand Down

0 comments on commit 923d2bf

Please sign in to comment.