[web] Remove v-html usage

Reinforcing security by remove the usage of v-html.
This commit is contained in:
Alain Nussbaumer
2023-07-02 18:11:41 +02:00
parent 5f433a2c20
commit 8fc97b1f2e
6 changed files with 55 additions and 19 deletions

View File

@@ -140,7 +140,27 @@
})
"
/>
<p class="is-size-7" v-html="$t('page.about.built-with')" />
<i18n-t tag="p" class="is-size-7" keypath="page.about.built-with">
<template #bulma><a href="https://bulma.io">Bulma</a></template>
<template #mdi
><a href="https://pictogrammers.com/library/mdi/"
>Material Design Icons</a
></template
>
<template #vuejs
><a href="https://vuejs.org/">Vue.js</a></template
>
<template #axios
><a href="https://github.com/mzabriskie/axios"
>axios</a
></template
>
<template #others
><a
href="https://github.com/owntone/owntone-server/network/dependencies"
v-text="$t('page.about.more')"
/></template>
</i18n-t>
</div>
</div>
</div>

View File

@@ -18,9 +18,19 @@
/>
<mdicon class="icon is-left" name="magnify" size="16" />
</p>
<p class="help has-text-centered">
<span v-html="$t('page.search.help')" />
</p>
<i18n-t
tag="p"
class="help has-text-centered"
keypath="page.search.help"
>
<template #query><code>query:</code></template>
<template #help
><a
href="https://owntone.github.io/owntone-server/smart-playlists/"
target="_blank"
v-text="$t('page.search.expression')"
/></template>
</i18n-t>
</div>
</form>
<div class="tags mt-4">

View File

@@ -19,7 +19,7 @@
<div class="mt-5">
<p
class="content"
v-html="$t('page.settings.services.spotify.grant-access')"
v-text="$t('page.settings.services.spotify.grant-access')"
/>
<p v-if="spotify.webapi_token_valid">
<span v-text="$t('page.settings.services.spotify.user')" />
@@ -74,7 +74,7 @@
<div v-if="lastfm.enabled">
<p
class="content"
v-html="$t('page.settings.services.lastfm.grant-access')"
v-text="$t('page.settings.services.lastfm.grant-access')"
/>
<div v-if="lastfm.scrobbling_enabled">
<a