Skip to content

Commit

Permalink
ESLint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eden881 committed Jan 25, 2025
1 parent 0796c43 commit 1502632
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
<div>{{ monitor.id }}</div>
</div>
</h1>
<!-- eslint-disable vue/no-v-html -->
<p v-if="monitor.description" v-html="processedDescription"></p>
<!--eslint-enable-->
<div class="d-flex">
<div class="tags">
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
Expand Down Expand Up @@ -403,10 +405,10 @@ export default {
processedDescription() {
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(
urlPattern,
url => `<a href="${this.escapeHtml(url)}" target="_blank" rel="noopener noreferrer">${this.escapeHtml(url)}</a>`
Expand Down

0 comments on commit 1502632

Please sign in to comment.