Commit 13e38a59 authored by Dheeraj Joshi's avatar Dheeraj Joshi

Switch to v-safe-html for alerts notes

parent 0c4e0b2c
<script> <script>
import { GlIcon } from '@gitlab/ui'; import { GlIcon, GlSafeHtmlDirective } from '@gitlab/ui';
import NoteHeader from '~/notes/components/note_header.vue'; import NoteHeader from '~/notes/components/note_header.vue';
export default { export default {
...@@ -7,6 +7,9 @@ export default { ...@@ -7,6 +7,9 @@ export default {
NoteHeader, NoteHeader,
GlIcon, GlIcon,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
props: { props: {
note: { note: {
type: Object, type: Object,
...@@ -39,7 +42,7 @@ export default { ...@@ -39,7 +42,7 @@ export default {
<div class="note-header"> <div class="note-header">
<note-header :author="noteAuthor" :created-at="note.createdAt" :note-id="note.id"> <note-header :author="noteAuthor" :created-at="note.createdAt" :note-id="note.id">
<span v-html="note.bodyHtml /* eslint-disable-line vue/no-v-html */"></span> <span v-safe-html="note.bodyHtml"></span>
</note-header> </note-header>
</div> </div>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment