security: replace src

This commit is contained in:
Xylight committed 2025-11-20 18:28:33 -08:00
1 parent 7c322310e9
commit 385a7dbc40
7 files changed
+22 -15

No files matched your search

+1 -10
View File
@@ -23,15 +23,6 @@
...rest
}: Props = $props()
function decodeHtmlEntities(input: string) {
return input
.replace(/'/g, "'")
.replace(/"/g, '"')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&amp;/g, '&')
}
if (header) {
type = 'tablecell'
}
@@ -50,7 +41,7 @@
{...rest}
/>
{:else if token.text}
{decodeHtmlEntities(token.text)}
{token.text}
{:else if text}
{text}
{/if}