mirror of https://github.com/louislam/uptime-kuma
Merge 5df79d0129
into cf44d39e1b
commit
6c565b7c2f
|
@ -9,7 +9,8 @@
|
|||
<div>{{ monitor.id }}</div>
|
||||
</div>
|
||||
</h1>
|
||||
<p v-if="monitor.description">{{ monitor.description }}</p>
|
||||
<!-- eslint-disable-next-line vue/no-v-html-->
|
||||
<p v-if="monitor.description" v-html="descriptionHTML"></p>
|
||||
<div class="d-flex">
|
||||
<div class="tags">
|
||||
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
|
||||
|
@ -285,6 +286,8 @@ import Tag from "../components/Tag.vue";
|
|||
import CertificateInfo from "../components/CertificateInfo.vue";
|
||||
import { getMonitorRelativeURL } from "../util.ts";
|
||||
import { URL } from "whatwg-url";
|
||||
import DOMPurify from "dompurify";
|
||||
import { marked } from "marked";
|
||||
import { getResBaseURL } from "../util-frontend";
|
||||
import { highlight, languages } from "prismjs/components/prism-core";
|
||||
import "prismjs/components/prism-clike";
|
||||
|
@ -399,6 +402,14 @@ export default {
|
|||
|
||||
screenshotURL() {
|
||||
return getResBaseURL() + this.monitor.screenshot + "?time=" + this.cacheTime;
|
||||
},
|
||||
|
||||
descriptionHTML() {
|
||||
if (this.monitor.description != null) {
|
||||
return DOMPurify.sanitize(marked(this.monitor.description));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue