Commit df2b360d authored by Dheeraj Joshi's avatar Dheeraj Joshi

Switch to v-safe-html in awards_list.vue

parent 9cbf90dd
<script>
import { GlIcon, GlButton, GlTooltipDirective } from '@gitlab/ui';
import { GlIcon, GlButton, GlTooltipDirective, GlSafeHtmlDirective } from '@gitlab/ui';
import { groupBy } from 'lodash';
import EmojiPicker from '~/emoji/components/picker.vue';
import { __, sprintf } from '~/locale';
......@@ -17,6 +17,7 @@ export default {
},
directives: {
GlTooltip: GlTooltipDirective,
SafeHtml: GlSafeHtmlDirective,
},
mixins: [glFeatureFlagsMixin()],
props: {
......@@ -163,6 +164,7 @@ export default {
this.isMenuOpen = menuOpen;
},
},
safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
};
</script>
......@@ -180,9 +182,9 @@ export default {
>
<template #emoji>
<span
v-safe-html:[$options.safeHtmlConfig]="awardList.html"
class="award-emoji-block"
data-testid="award-html"
v-html="awardList.html /* eslint-disable-line vue/no-v-html */"
></span>
</template>
<span class="js-counter">{{ awardList.list.length }}</span>
......
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