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