feat: dompurify 플러그인설치, 푸터 추가

This commit is contained in:
“hyeonggkim”
2025-09-10 09:55:28 +09:00
parent fcd4dc799b
commit 6f267879cf
5 changed files with 698 additions and 292 deletions

View File

@@ -0,0 +1,16 @@
import DOMPurify from 'dompurify'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.directive('dompurify-html', {
mounted(el: HTMLElement, binding: any) {
if (binding.value) {
el.innerHTML = DOMPurify.sanitize(binding.value)
}
},
updated(el: HTMLElement, binding: any) {
if (binding.value) {
el.innerHTML = DOMPurify.sanitize(binding.value)
}
}
})
})