Commit b04f7c51 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'djadmin-safehtml-glemoji-2' into 'master'

Switch to v-safe-html in request_warning.vue

See merge request gitlab-org/gitlab!69935
parents 18bf6237 aefc7ad6
<script>
import { GlPopover } from '@gitlab/ui';
import { GlPopover, GlSafeHtmlDirective } from '@gitlab/ui';
import { glEmojiTag } from '~/emoji';
export default {
components: {
GlPopover,
},
directives: {
SafeHtml: GlSafeHtmlDirective,
},
props: {
htmlId: {
type: String,
......@@ -31,14 +34,12 @@ export default {
methods: {
glEmojiTag,
},
safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
};
</script>
<template>
<span v-if="hasWarnings" class="gl-cursor-default">
<span
:id="htmlId"
v-html="glEmojiTag('warning') /* eslint-disable-line vue/no-v-html */"
></span>
<span :id="htmlId" v-safe-html:[$options.safeHtmlConfig]="glEmojiTag('warning')"></span>
<gl-popover placement="bottom" :target="htmlId" :content="warningMessage" />
</span>
</template>
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