Commit 6115d0d4 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'djadmin-safe-html-ci-header' into 'master'

Switch to v-safe-html in header_ci_component.vue

See merge request gitlab-org/gitlab!69951
parents d78e5979 cf6691f3
<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