diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/notes/system_note.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/notes/system_note.vue | 7 |
1 files changed, 4 insertions, 3 deletions
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"> |