Commit 711264d8 authored by Kev's avatar Kev

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

parent e2e3b618
<script> <script>
/* eslint-disable vue/no-v-html */
import $ from 'jquery'; import $ from 'jquery';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import eventHub from '~/sidebar/event_hub'; import eventHub from '~/sidebar/event_hub';
...@@ -14,6 +13,7 @@ export default { ...@@ -14,6 +13,7 @@ export default {
}, },
directives: { directives: {
tooltip, tooltip,
SafeHtml,
}, },
mixins: [Tracking.mixin({ label: 'right_sidebar' })], mixins: [Tracking.mixin({ label: 'right_sidebar' })],
props: { props: {
...@@ -166,7 +166,11 @@ export default { ...@@ -166,7 +166,11 @@ export default {
> >
<gl-icon :size="16" name="weight" /> <gl-icon :size="16" name="weight" />
<gl-loading-icon v-if="fetching" class="js-weight-collapsed-loading-icon" /> <gl-loading-icon v-if="fetching" class="js-weight-collapsed-loading-icon" />
<span v-else class="js-weight-collapsed-weight-label" v-html="collapsedWeightLabel"></span> <span
v-else
v-safe-html="collapsedWeightLabel"
class="js-weight-collapsed-weight-label"
></span>
</div> </div>
<div class="title hide-collapsed"> <div class="title hide-collapsed">
{{ s__('Sidebar|Weight') }} {{ s__('Sidebar|Weight') }}
......
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