diff options
Diffstat (limited to 'app/assets/javascripts/snippets/components/snippet_description_view.vue')
-rw-r--r-- | app/assets/javascripts/snippets/components/snippet_description_view.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/snippets/components/snippet_description_view.vue b/app/assets/javascripts/snippets/components/snippet_description_view.vue index 62d95a650da..737a131ce7c 100644 --- a/app/assets/javascripts/snippets/components/snippet_description_view.vue +++ b/app/assets/javascripts/snippets/components/snippet_description_view.vue @@ -1,10 +1,14 @@ <script> +import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; import MarkdownFieldView from '~/vue_shared/components/markdown/field_view.vue'; export default { components: { MarkdownFieldView, }, + directives: { + SafeHtml, + }, props: { description: { type: String, @@ -12,13 +16,14 @@ export default { default: '', }, }, + safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] }, }; </script> <template> <markdown-field-view class="snippet-description" data-qa-selector="snippet_description_content"> <div + v-safe-html:[$options.safeHtmlConfig]="description" class="md js-snippet-description" - v-html="description /* eslint-disable-line vue/no-v-html */" ></div> </markdown-field-view> </template> |