Fix html sanitization

This commit is contained in:
wvffle 2022-07-01 14:40:49 +00:00 committed by Georg Krause
parent fd403ab7ca
commit 4240396220
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { sanitize } from 'dompurify'
import DOMPurify from 'dompurify'
import { computed, h } from 'vue'
interface Props {
@ -11,7 +11,7 @@ const props = withDefaults(defineProps<Props>(), {
tag: 'div'
})
const html = computed(() => sanitize(props.html))
const html = computed(() => DOMPurify.sanitize(props.html))
const root = () => h(props.tag, { innerHTML: html.value })
</script>