Commit 199b9314 authored by Phil Hughes's avatar Phil Hughes

Merge branch '241936-replace-v-html' into 'master'

Removes v-html from app/assets/javascripts/vue_shared/components/content_viewer/viewers/markdown_viewer.vue

See merge request gitlab-org/gitlab!73083
parents b9322139 af2f9ccf
<script>
import { GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui';
import {
GlDeprecatedSkeletonLoading as GlSkeletonLoading,
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui';
import $ from 'jquery';
import '~/behaviors/markdown/render_gfm';
import { forEach, escape } from 'lodash';
......@@ -13,6 +16,9 @@ export default {
components: {
GlSkeletonLoading,
},
directives: {
SafeHtml,
},
props: {
content: {
type: String,
......@@ -103,6 +109,7 @@ export default {
}
},
},
safeHtmlConfig: { ADD_TAGS: ['gl-emoji', 'use'] },
};
</script>
......@@ -111,8 +118,8 @@ export default {
<gl-skeleton-loading v-if="isLoading" />
<div
v-else
v-safe-html:[$options.safeHtmlConfig]="previewContent"
class="md gl-ml-auto gl-mr-auto"
v-html="previewContent /* eslint-disable-line vue/no-v-html */"
></div>
</div>
</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