Switch to linkify-html rather than linkify-string
This commit is contained in:
parent
fb10a87444
commit
b9b32d81ef
@ -25,7 +25,7 @@
|
||||
"date-fns": "^2.29.3",
|
||||
"date-fns-tz": "^1.3.7",
|
||||
"leaflet": "^1.9.2",
|
||||
"linkify-string": "^4.0.2",
|
||||
"linkify-html": "^4.0.2",
|
||||
"linkifyjs": "^4.0.2",
|
||||
"register-service-worker": "^1.7.1",
|
||||
"vue": "^3.2.41",
|
||||
|
@ -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 {
|
||||
|
@ -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) => {
|
||||
|
@ -5236,10 +5236,10 @@ lines-and-columns@^1.1.6:
|
||||
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
|
||||
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
||||
|
||||
linkify-string@^4.0.2:
|
||||
linkify-html@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/linkify-string/-/linkify-string-4.0.2.tgz#9f785f4e910375b2399f94ff0f3e213a02c350ca"
|
||||
integrity sha512-+HoBme50rPaKxh5TrEJqRLq4gphks1zj3cz6gMBKIHwJCFYVwHig8ii9aCzqGUz8DxF2otbq+Z3AJmKUnfOtKg==
|
||||
resolved "https://registry.yarnpkg.com/linkify-html/-/linkify-html-4.0.2.tgz#f55e58ee27b4e34793f03a0bf81910c8a92151e5"
|
||||
integrity sha512-YcN3tsyutK2Y/uSuoG0zne8FQdoqzrAgNU5ko0DWE7M2oQ3ms4z/202f2W4TvRm9uxKdrsWAullfynANLaVMqw==
|
||||
|
||||
linkifyjs@^4.0.2:
|
||||
version "4.0.2"
|
||||
|
Loading…
Reference in New Issue
Block a user