Commit 03140464 authored by Rishabh Gupta's avatar Rishabh Gupta Committed by Ezekiel Kigbo

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

parent f746aadb
<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