Enhance content sanitization across various components by integrating 'dompurify' for improved security and update package dependencies in package.json and package-lock.json.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 4m56s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 4m56s
This commit is contained in:
@@ -13,9 +13,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import { useSanitizeHtml } from '~/composables/useSanitizeHtml'
|
||||
|
||||
const content = ref('')
|
||||
const rawContent = ref('')
|
||||
|
||||
const content = computed(() => useSanitizeHtml(rawContent.value))
|
||||
|
||||
useHead({
|
||||
title: 'TT-Regeln - Harheimer TC',
|
||||
@@ -24,9 +27,9 @@ useHead({
|
||||
async function loadConfig() {
|
||||
try {
|
||||
const data = await $fetch('/api/config')
|
||||
content.value = data?.seiten?.ttRegeln || ''
|
||||
rawContent.value = data?.seiten?.ttRegeln || ''
|
||||
} catch (e) {
|
||||
content.value = ''
|
||||
rawContent.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user