Commit 18ecd88a authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'djadmin-vhtml-notebody-alerts' into 'master'

Switch to v-safe-html for notes in alert_details component

See merge request gitlab-org/gitlab!72876
parents 27696431 13e38a59
<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