Commit cf6691f3 authored by Dheeraj Joshi's avatar Dheeraj Joshi

Switch to v-safe-html in header_ci.vue

parent 9cbf90dd
<script>
import { GlTooltipDirective, GlLink, GlButton, GlTooltip } from '@gitlab/ui';
import { GlTooltipDirective, GlLink, GlButton, GlTooltip, GlSafeHtmlDirective } from '@gitlab/ui';
import { glEmojiTag } from '../../emoji';
import { __, sprintf } from '../../locale';
import CiIconBadge from './ci_badge_link.vue';
......@@ -24,6 +24,7 @@ export default {
},
directives: {
GlTooltip: GlTooltipDirective,
SafeHtml: GlSafeHtmlDirective,
},
EMOJI_REF: 'EMOJI_REF',
props: {
......@@ -92,6 +93,7 @@ export default {
this.$emit('clickedSidebarButton');
},
},
safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
};
</script>
......@@ -129,8 +131,8 @@ export default {
<span
v-if="statusTooltipHTML"
:ref="$options.EMOJI_REF"
v-safe-html:[$options.safeHtmlConfig]="statusTooltipHTML"
:data-testid="message"
v-html="statusTooltipHTML /* eslint-disable-line vue/no-v-html */"
></span>
</template>
</section>
......
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