mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Enhance Security + Formatting
This commit is contained in:
3 files changed
+20
-4
No files matched your search
@@ -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>
|
||||
Reference in new issue
Block a user