mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-22 19:45:56 +00:00
ESLint fixes
This commit is contained in:
parent
0796c4353d
commit
1502632433
1 changed files with 4 additions and 2 deletions
|
@ -9,7 +9,9 @@
|
||||||
<div>{{ monitor.id }}</div>
|
<div>{{ monitor.id }}</div>
|
||||||
</div>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
<p v-if="monitor.description" v-html="processedDescription"></p>
|
<p v-if="monitor.description" v-html="processedDescription"></p>
|
||||||
|
<!--eslint-enable-->
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
|
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
|
||||||
|
@ -403,10 +405,10 @@ export default {
|
||||||
|
|
||||||
processedDescription() {
|
processedDescription() {
|
||||||
if (!this.monitor.description) {
|
if (!this.monitor.description) {
|
||||||
return '';
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const urlPattern = /(\b(?:https?|ftp|file|smb|ssh|telnet|ldap|git):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi;
|
const urlPattern = /(\b(?:https?|ftp|file|smb|ssh|telnet|ldap|git):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;
|
||||||
const processed = this.monitor.description.replace(
|
const processed = this.monitor.description.replace(
|
||||||
urlPattern,
|
urlPattern,
|
||||||
url => `<a href="${this.escapeHtml(url)}" target="_blank" rel="noopener noreferrer">${this.escapeHtml(url)}</a>`
|
url => `<a href="${this.escapeHtml(url)}" target="_blank" rel="noopener noreferrer">${this.escapeHtml(url)}</a>`
|
||||||
|
|
Loading…
Add table
Reference in a new issue