Skip to content

Commit 934bebd

Browse files
committed
refac
1 parent 1719408 commit 934bebd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib/components/common/FileItemModal.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import type { WorkBook } from 'xlsx';
3+
import DOMPurify from 'dompurify';
34
45
import { getContext, onMount, tick } from 'svelte';
56
@@ -118,11 +119,11 @@
118119
const range = XLSX.utils.decode_range(worksheet['!ref'] || 'A1:A1');
119120
rowCount = range.e.r - range.s.r + 1;
120121
121-
excelHtml = XLSX.utils.sheet_to_html(worksheet, {
122+
excelHtml = DOMPurify.sanitize(XLSX.utils.sheet_to_html(worksheet, {
122123
id: 'excel-table',
123124
editable: false,
124125
header: ''
125-
});
126+
}));
126127
};
127128
128129
$: if (selectedSheet && excelWorkbook) {

0 commit comments

Comments
 (0)