Commit 0ac2f3df authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'imrishabh18-#241934' into 'master'

refactor: replacing v-html with v-safe-html in the snippet description view component

See merge request gitlab-org/gitlab!70828
parents 63bf35e0 ff8ad056
<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>
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