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