Commit 699e40dd authored by Kushal Pandya's avatar Kushal Pandya

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

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

See merge request gitlab-org/gitlab!41130
parents 95689fc5 4dfb5d43
<script> <script>
/* eslint-disable vue/no-v-html */ import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import { escape } from 'lodash'; import { escape } from 'lodash';
import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue'; import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
...@@ -8,6 +8,9 @@ export default { ...@@ -8,6 +8,9 @@ export default {
components: { components: {
DeprecatedModal, DeprecatedModal,
}, },
directives: {
SafeHtml,
},
props: { props: {
deleteProjectUrl: { deleteProjectUrl: {
type: String, type: String,
...@@ -94,8 +97,8 @@ export default { ...@@ -94,8 +97,8 @@ export default {
@cancel="onCancel" @cancel="onCancel"
> >
<template #body="props"> <template #body="props">
<p v-html="props.text"></p> <p v-safe-html="props.text"></p>
<p v-html="confirmationTextLabel"></p> <p v-safe-html="confirmationTextLabel"></p>
<form ref="form" :action="deleteProjectUrl" method="post"> <form ref="form" :action="deleteProjectUrl" method="post">
<input ref="method" type="hidden" name="_method" value="delete" /> <input ref="method" type="hidden" name="_method" value="delete" />
<input :value="csrfToken" type="hidden" name="authenticity_token" /> <input :value="csrfToken" type="hidden" name="authenticity_token" />
......
---
title: Replace v-html with v-safe-html in delete_project_modal.vue
merge_request: 41130
author: Kev @KevSlashNull
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