Commit 2073446f authored by kkoji's avatar kkoji Committed by Mark Florian

Replace v-html to v-safe-html directive

parent 417e8baf
<script> <script>
/* eslint-disable vue/no-v-html */ import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { deprecatedCreateFlash as Flash } from '~/flash'; import { deprecatedCreateFlash as Flash } from '~/flash';
...@@ -12,6 +12,9 @@ export default { ...@@ -12,6 +12,9 @@ export default {
components: { components: {
DeprecatedModal, DeprecatedModal,
}, },
directives: {
SafeHtml,
},
props: { props: {
issueCount: { issueCount: {
type: Number, type: Number,
...@@ -125,7 +128,7 @@ Once deleted, it cannot be undone or recovered.`), ...@@ -125,7 +128,7 @@ Once deleted, it cannot be undone or recovered.`),
@submit="onSubmit" @submit="onSubmit"
> >
<template #body="props"> <template #body="props">
<p v-html="props.text"></p> <p v-safe-html="props.text"></p>
</template> </template>
</deprecated-modal> </deprecated-modal>
</template> </template>
---
title: Replace v-html to v-safe-html directive
merge_request: 41305
author: Kazuya Kojima
type: other
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