Commit 7b3cf5d6 authored by Natalia Tepluhina's avatar Natalia Tepluhina

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

Remove v-html from repository preview

See merge request gitlab-org/gitlab!70833
parents 518d76c9 3bac7a21
<script>
import { GlIcon, GlLink, GlLoadingIcon } from '@gitlab/ui';
import { GlIcon, GlLink, GlLoadingIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import $ from 'jquery';
import '~/behaviors/markdown/render_gfm';
import { handleLocationHash } from '~/lib/utils/common_utils';
......@@ -22,6 +22,9 @@ export default {
GlLink,
GlLoadingIcon,
},
directives: {
SafeHtml,
},
props: {
blob: {
type: Object,
......@@ -59,11 +62,7 @@ export default {
</div>
<div class="blob-viewer" data-qa-selector="blob_viewer_content" itemprop="about">
<gl-loading-icon v-if="loading > 0" size="md" color="dark" class="my-4 mx-auto" />
<div
v-else-if="readme"
ref="readme"
v-html="readme.html /* eslint-disable-line vue/no-v-html */"
></div>
<div v-else-if="readme" ref="readme" v-safe-html="readme.html"></div>
</div>
</article>
</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