diff options
Diffstat (limited to 'app/assets/javascripts/releases/components/release_block.vue')
-rw-r--r-- | app/assets/javascripts/releases/components/release_block.vue | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/assets/javascripts/releases/components/release_block.vue b/app/assets/javascripts/releases/components/release_block.vue index 3201ca1f443..b2bd405574f 100644 --- a/app/assets/javascripts/releases/components/release_block.vue +++ b/app/assets/javascripts/releases/components/release_block.vue @@ -1,4 +1,5 @@ <script> +import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; import $ from 'jquery'; import { isEmpty } from 'lodash'; import { scrollToElement } from '~/lib/utils/common_utils'; @@ -21,6 +22,9 @@ export default { ReleaseBlockHeader, ReleaseBlockMilestoneInfo, }, + directives: { + SafeHtml, + }, mixins: [glFeatureFlagsMixin()], props: { release: { @@ -79,6 +83,7 @@ export default { $(this.$refs['gfm-content']).renderGFM(); }, }, + safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] }, }; </script> <template> @@ -102,10 +107,7 @@ export default { <evidence-block v-if="hasEvidence" :release="release" /> <div ref="gfm-content" class="card-text gl-mt-3"> - <div - class="md" - v-html="release.descriptionHtml /* eslint-disable-line vue/no-v-html */" - ></div> + <div v-safe-html:[$options.safeHtmlConfig]="release.descriptionHtml" class="md"></div> </div> </div> |