mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Don't ignore v-html rule globally.
This commit is contained in:
parent
51b394751d
commit
12c3807d9a
3 changed files with 8 additions and 10 deletions
|
@ -1,6 +1,4 @@
|
|||
module.exports = {
|
||||
extends: ["plugin:vue/vue3-recommended", "plugin:prettier/recommended"],
|
||||
rules: {
|
||||
"vue/no-v-html": "off",
|
||||
},
|
||||
rules: {},
|
||||
};
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<img height="48" width="48" class="uk-border-circle" :src="channel.avatarUrl" />{{ channel.name }}
|
||||
</h1>
|
||||
<img v-if="channel.bannerUrl" :src="channel.bannerUrl" style="width: 100%" loading="lazy" />
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<p style="white-space: pre-wrap"><span v-html="purifyHTML(urlify(channel.description))"></span></p>
|
||||
|
||||
<button
|
||||
|
|
|
@ -85,7 +85,8 @@
|
|||
<a class="uk-button uk-button-small" style="background: #222" @click="showDesc = !showDesc">
|
||||
{{ showDesc ? $t("actions.minimize_description") : $t("actions.show_description") }}
|
||||
</a>
|
||||
<p v-show="showDesc" :style="[{ colour: foregroundColor }]" v-html="video.description"></p>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<p v-show="showDesc" :style="[{ colour: foregroundColor }]" v-html="purifyHTML(video.description)"></p>
|
||||
<div v-if="showDesc && sponsors && sponsors.segments">
|
||||
{{ $t("video.sponsor_segments") }}: {{ sponsors.segments.length }}
|
||||
</div>
|
||||
|
@ -280,12 +281,10 @@ export default {
|
|||
this.channelId = this.video.uploaderUrl.split("/")[2];
|
||||
if (!this.isEmbed) this.fetchSubscribedStatus();
|
||||
|
||||
this.video.description = this.purifyHTML(
|
||||
this.video.description
|
||||
.replaceAll("http://www.youtube.com", "")
|
||||
.replaceAll("https://www.youtube.com", "")
|
||||
.replaceAll("\n", "<br>"),
|
||||
);
|
||||
this.video.description = this.video.description
|
||||
.replaceAll("http://www.youtube.com", "")
|
||||
.replaceAll("https://www.youtube.com", "")
|
||||
.replaceAll("\n", "<br>");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue