diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/notes')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/notes/noteable_warning.vue | 5 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/notes/system_note.vue | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/vue_shared/components/notes/noteable_warning.vue b/app/assets/javascripts/vue_shared/components/notes/noteable_warning.vue index ad6f6e0e2e3..0b302f22062 100644 --- a/app/assets/javascripts/vue_shared/components/notes/noteable_warning.vue +++ b/app/assets/javascripts/vue_shared/components/notes/noteable_warning.vue @@ -1,5 +1,4 @@ <script> -/* eslint-disable vue/no-v-html */ import { GlLink, GlIcon } from '@gitlab/ui'; import { escape } from 'lodash'; import { __, sprintf } from '~/locale'; @@ -92,7 +91,9 @@ export default { <gl-icon v-if="!isLockedAndConfidential" :name="warningIcon" :size="16" class="icon inline" /> <span v-if="isLockedAndConfidential" ref="lockedAndConfidential"> - <span v-html="confidentialAndLockedDiscussionText"></span> + <span + v-html="confidentialAndLockedDiscussionText /* eslint-disable-line vue/no-v-html */" + ></span> {{ __("People without permission will never get a notification and won't be able to comment.") }} diff --git a/app/assets/javascripts/vue_shared/components/notes/system_note.vue b/app/assets/javascripts/vue_shared/components/notes/system_note.vue index c3d861d74bc..755e6f1f224 100644 --- a/app/assets/javascripts/vue_shared/components/notes/system_note.vue +++ b/app/assets/javascripts/vue_shared/components/notes/system_note.vue @@ -1,6 +1,4 @@ <script> -/* eslint-disable vue/no-v-html */ - /** * Common component to render a system note, icon and user information. * @@ -97,6 +95,9 @@ export default { methods: { ...mapActions(['fetchDescriptionVersion', 'softDeleteDescriptionVersion']), }, + safeHtmlConfig: { + ADD_TAGS: ['use'], // to support icon SVGs + }, }; </script> @@ -106,7 +107,7 @@ export default { :class="{ target: isTargetNote, 'pr-0': shouldShowDescriptionVersion }" class="note system-note note-wrapper" > - <div class="timeline-icon" v-html="iconHtml"></div> + <div v-safe-html:[$options.safeHtmlConfig]="iconHtml" class="timeline-icon"></div> <div class="timeline-content"> <div class="note-header"> <note-header :author="note.author" :created-at="note.created_at" :note-id="note.id"> |