Commit 358be122 authored by Kev's avatar Kev

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

parent 438aade5
<script>
/* eslint-disable vue/no-v-html */
import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import iconTimerSvg from 'icons/_icon_timer.svg';
import '~/lib/utils/datetime_utility';
import tooltip from '~/vue_shared/directives/tooltip';
......@@ -8,6 +8,7 @@ import timeagoMixin from '~/vue_shared/mixins/timeago';
export default {
directives: {
tooltip,
SafeHtml,
},
mixins: [timeagoMixin],
props: {
......@@ -60,7 +61,7 @@ export default {
<div class="table-mobile-header" role="rowheader">{{ s__('Pipeline|Duration') }}</div>
<div class="table-mobile-content">
<p v-if="hasDuration" class="duration">
<span v-html="iconTimerSvg"> </span> {{ durationFormatted }}
<span v-safe-html="iconTimerSvg"> </span> {{ durationFormatted }}
</p>
<p v-if="hasFinishedTime" class="finished-at d-none d-sm-none d-md-block">
......
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