Switch to linkify-html rather than linkify-string

This commit is contained in:
Joshua Taillon
2022-11-05 01:25:07 -06:00
parent fb10a87444
commit b9b32d81ef
4 changed files with 7 additions and 7 deletions

View File

@ -3,14 +3,14 @@
<Card>
<template #title>{{ $t('workouts.NOTES') }}</template>
<template #content>
<span v-html="notes !== '' ? $sanitize(linkifyStr(notes, { target: '_blank' })) : $t('workouts.NO_NOTES')" />
<span v-html="notes !== '' ? $sanitize(linkifyHtml(notes, { target: '_blank' })) : $t('workouts.NO_NOTES')" />
</template>
</Card>
</div>
</template>
<script setup lang="ts">
import linkifyStr from 'linkify-string'
import linkifyHtml from 'linkify-html'
import { toRefs, withDefaults } from 'vue'
interface Props {

View File

@ -48,7 +48,7 @@ const app = createApp(App)
.use(store)
.use(router)
.use(VueFullscreen, { name: 'VFullscreen' })
.use(Vue3Sanitize, { allowedTags: ['a'] })
.use(Vue3Sanitize, { allowedTags: ['a'], disallowedTagsMode: 'escape' })
.directive('click-outside', clickOutsideDirective)
customComponents.forEach((component) => {