Fix html sanitization
This commit is contained in:
parent
fd403ab7ca
commit
4240396220
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue