We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1719408 commit 934bebdCopy full SHA for 934bebd
1 file changed
src/lib/components/common/FileItemModal.svelte
@@ -1,5 +1,6 @@
1
<script lang="ts">
2
import type { WorkBook } from 'xlsx';
3
+ import DOMPurify from 'dompurify';
4
5
import { getContext, onMount, tick } from 'svelte';
6
@@ -118,11 +119,11 @@
118
119
const range = XLSX.utils.decode_range(worksheet['!ref'] || 'A1:A1');
120
rowCount = range.e.r - range.s.r + 1;
121
- excelHtml = XLSX.utils.sheet_to_html(worksheet, {
122
+ excelHtml = DOMPurify.sanitize(XLSX.utils.sheet_to_html(worksheet, {
123
id: 'excel-table',
124
editable: false,
125
header: ''
- });
126
+ }));
127
};
128
129
$: if (selectedSheet && excelWorkbook) {
0 commit comments