Commit 7643482c authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch...

Merge branch '241925-remove-v-html-from-app-assets-javascripts-vue_shared-components-blob_viewers-rich_viewer-vue' into 'master'

Remove v-html from app/assets/javascripts/vue_shared/components/blob_viewers/rich_viewer.vue

Closes #241925

See merge request gitlab-org/gitlab!41509
parents 4d49fa22 7aa7efac
<script>
/* eslint-disable vue/no-v-html */
import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import MarkdownFieldView from '~/vue_shared/components/markdown/field_view.vue';
import ViewerMixin from './mixins';
import { handleBlobRichViewer } from '~/blob/viewer';
......@@ -8,6 +8,9 @@ export default {
components: {
MarkdownFieldView,
},
directives: {
SafeHtml,
},
mixins: [ViewerMixin],
mounted() {
handleBlobRichViewer(this.$refs.content, this.type);
......@@ -15,5 +18,5 @@ export default {
};
</script>
<template>
<markdown-field-view ref="content" v-html="content" />
<markdown-field-view ref="content" v-safe-html="content" />
</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