Commit ba6c21a0 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '241891-Replace-v-html' into 'master'

Replace v-html with v-safe-html in history_comment.vue

See merge request gitlab-org/gitlab!41125
parents 5e95de31 838ad1d5
<script> <script>
/* eslint-disable vue/no-v-html */ import { GlDeprecatedButton, GlButton, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import { GlDeprecatedButton, GlButton } from '@gitlab/ui';
import EventItem from 'ee/vue_shared/security_reports/components/event_item.vue'; import EventItem from 'ee/vue_shared/security_reports/components/event_item.vue';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
...@@ -15,6 +14,10 @@ export default { ...@@ -15,6 +14,10 @@ export default {
HistoryCommentEditor, HistoryCommentEditor,
}, },
directives: {
SafeHtml,
},
props: { props: {
comment: { comment: {
type: Object, type: Object,
...@@ -154,7 +157,7 @@ export default { ...@@ -154,7 +157,7 @@ export default {
icon-class="timeline-icon m-0" icon-class="timeline-icon m-0"
class="m-3" class="m-3"
> >
<div class="md" v-html="comment.note_html"></div> <div v-safe-html="comment.note_html" class="md"></div>
<template #right-content> <template #right-content>
<gl-button <gl-button
......
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