Commit c799e7be authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

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

Replace v-html with v-safe-html in the release block component

See merge request gitlab-org/gitlab!70831
parents f76e7419 03140464
<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>
......
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