security: replace src
This commit is contained in:
7 files changed
+22
-15
No files matched your search
@@ -23,15 +23,6 @@
|
||||
...rest
|
||||
}: Props = $props()
|
||||
|
||||
function decodeHtmlEntities(input: string) {
|
||||
return input
|
||||
.replace(/'/g, "'")
|
||||
.replace(/"/g, '"')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/&/g, '&')
|
||||
}
|
||||
|
||||
if (header) {
|
||||
type = 'tablecell'
|
||||
}
|
||||
@@ -50,7 +41,7 @@
|
||||
{...rest}
|
||||
/>
|
||||
{:else if token.text}
|
||||
{decodeHtmlEntities(token.text)}
|
||||
{token.text}
|
||||
{:else if text}
|
||||
{text}
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user