Commit caa89cee authored by Andrew Fontaine's avatar Andrew Fontaine

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

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

See merge request gitlab-org/gitlab!41145
parents fdf7f6a1 a77b0852
<script>
/* eslint-disable vue/no-v-html */
import { mapActions, mapGetters, mapState } from 'vuex';
import { escape } from 'lodash';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { GlLoadingIcon, GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import { sprintf, __ } from '../../../locale';
import CiIcon from '../../../vue_shared/components/ci_icon.vue';
import Tabs from '../../../vue_shared/components/tabs/tabs';
......@@ -22,6 +21,9 @@ export default {
EmptyState,
GlLoadingIcon,
},
directives: {
SafeHtml,
},
computed: {
...mapState(['pipelinesEmptyStateSvgPath', 'links']),
...mapGetters(['currentProject']),
......@@ -84,7 +86,7 @@ export default {
<div v-else-if="latestPipeline.yamlError" class="bs-callout bs-callout-danger">
<p class="gl-mb-0">{{ __('Found errors in your .gitlab-ci.yml:') }}</p>
<p class="gl-mb-0 break-word">{{ latestPipeline.yamlError }}</p>
<p class="gl-mb-0" v-html="ciLintText"></p>
<p v-safe-html="ciLintText" class="gl-mb-0"></p>
</div>
<tabs v-else class="ide-pipeline-list">
<tab :active="!pipelineFailed">
......
---
title: Replace v-html with v-safe-html in list.vue
merge_request: 41145
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