Commit df2b360d authored by Dheeraj Joshi's avatar Dheeraj Joshi

Switch to v-safe-html in awards_list.vue

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