Commit 358be122 authored by Kev's avatar Kev

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

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