mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-31 19:07:20 +08:00
fix: sanitize footer copyright html
Sanitize footer copyright HTML before rendering it with v-html.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import { useScopedI18n } from '@/i18n/app'
|
||||
import { useGlobalState } from '../store'
|
||||
import DOMPurify from 'dompurify'
|
||||
const { openSettings } = useGlobalState()
|
||||
|
||||
|
||||
@@ -17,7 +18,7 @@ const { t } = useScopedI18n('views.Footer')
|
||||
{{ t('copyright') }} © 2023-{{ new Date().getFullYear() }}
|
||||
</n-text>
|
||||
<n-text depth="3">
|
||||
<div v-html="openSettings.copyright"></div>
|
||||
<div v-html="DOMPurify.sanitize(openSettings.copyright)"></div>
|
||||
</n-text>
|
||||
</n-space>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user