Commit 31863be8 authored by Vitaly Slobodin's avatar Vitaly Slobodin

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

parent 2f5a0d41
<script> <script>
/* eslint-disable vue/no-v-html */ import { GlButton, GlSafeHtmlDirective } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
import { joinPaths } from '~/lib/utils/url_utility'; import { joinPaths } from '~/lib/utils/url_utility';
import { sprintf, s__ } from '../../../locale'; import { sprintf, s__ } from '../../../locale';
...@@ -9,6 +8,9 @@ export default { ...@@ -9,6 +8,9 @@ export default {
components: { components: {
GlButton, GlButton,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
computed: { computed: {
href() { href() {
return joinPaths(gon.relative_url_root || '', '/help/user/project/time_tracking.md'); return joinPaths(gon.relative_url_root || '', '/help/user/project/time_tracking.md');
...@@ -40,8 +42,8 @@ export default { ...@@ -40,8 +42,8 @@ export default {
<div class="time-tracking-info"> <div class="time-tracking-info">
<h4>{{ __('Track time with quick actions') }}</h4> <h4>{{ __('Track time with quick actions') }}</h4>
<p>{{ __('Quick actions can be used in description and comment boxes.') }}</p> <p>{{ __('Quick actions can be used in description and comment boxes.') }}</p>
<p v-html="estimateText"></p> <p v-safe-html="estimateText"></p>
<p v-html="spendText"></p> <p v-safe-html="spendText"></p>
<gl-button :href="href">{{ __('Learn more') }}</gl-button> <gl-button :href="href">{{ __('Learn more') }}</gl-button>
</div> </div>
</div> </div>
......
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