Enhance Security + Formatting

This commit is contained in:
BretRen committed 2026-07-19 23:05:09 -07:00
1 parent f4895412d7
commit e2e1c2b4d7
3 files changed
+20 -4

No files matched your search

+12 -4
View File
@@ -3,6 +3,7 @@
import { disableCommands } from '$lib/commandCenter';
import { Form } from '$lib/elements/forms';
import { Alert, Layout, Modal } from '@appwrite.io/pink-svelte';
import DOMPurify from 'dompurify';
export let show = false;
export let autoClose = true;
@@ -51,7 +52,10 @@
on:dismiss={() => {
error = null;
}}>
{@html error}
{@html DOMPurify.sanitize(error, {
ALLOWED_TAGS: ['a'],
ALLOWED_ATTR: ['href', 'target', 'rel']
})}
</Alert.Inline>
</div>
{/if}
@@ -78,7 +82,11 @@
}
.alert-error :global(a) {
color: inherit;
text-decoration: underline;
}
color: inherit;
text-decoration: underline;
}
rt-error :global(a) {
color: inherit;
text-decoration: underline;
}
</style>