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:
@@ -43,11 +43,14 @@
|
||||
</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 pdfUrl = ref('')
|
||||
|
||||
const content = computed(() => useSanitizeHtml(rawContent.value))
|
||||
|
||||
useHead({
|
||||
title: 'Satzung - Harheimer TC',
|
||||
})
|
||||
@@ -57,11 +60,11 @@ async function loadConfig() {
|
||||
const data = await $fetch('/api/config')
|
||||
const satzung = data?.seiten?.satzung
|
||||
if (satzung) {
|
||||
content.value = satzung.content || ''
|
||||
rawContent.value = satzung.content || ''
|
||||
pdfUrl.value = satzung.pdfUrl || ''
|
||||
}
|
||||
} catch (e) {
|
||||
content.value = ''
|
||||
rawContent.value = ''
|
||||
pdfUrl.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user