diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-04 18:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-04 18:16:11 +0300 |
commit | 73e15fde38825a490903ef88933d8896585f3008 (patch) | |
tree | 9540de3751be70a2f101185c8f830452d3a2ad1d /app/assets/javascripts/diffs | |
parent | 7150920cea6cdd82b9409d5757fa26dac66876d1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r-- | app/assets/javascripts/diffs/components/diff_view.vue | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_view.vue b/app/assets/javascripts/diffs/components/diff_view.vue index 333bf1b356c..f46b0a538f1 100644 --- a/app/assets/javascripts/diffs/components/diff_view.vue +++ b/app/assets/javascripts/diffs/components/diff_view.vue @@ -1,4 +1,5 @@ <script> +import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; import { mapGetters, mapState, mapActions } from 'vuex'; import { IdState } from 'vendor/vue-virtual-scroller'; import DraftNote from '~/batch_comments/components/draft_note.vue'; @@ -19,6 +20,9 @@ export default { DiffCommentCell, DraftNote, }, + directives: { + SafeHtml, + }, mixins: [ draftCommentsMixin, glFeatureFlagsMixin(), @@ -173,15 +177,17 @@ export default { <div class="diff-grid-left diff-grid-3-col left-side"> <div class="diff-td diff-line-num"></div> <div v-if="inline" class="diff-td diff-line-num"></div> - <div class="diff-td line_content left-side gl-white-space-normal!"> - {{ line.left.rich_text }} - </div> + <div + v-safe-html="line.left.rich_text" + class="diff-td line_content left-side gl-white-space-normal!" + ></div> </div> <div v-if="!inline" class="diff-grid-right diff-grid-3-col right-side"> <div class="diff-td diff-line-num"></div> - <div class="diff-td line_content right-side gl-white-space-normal!"> - {{ line.left.rich_text }} - </div> + <div + v-safe-html="line.left.rich_text" + class="diff-td line_content right-side gl-white-space-normal!" + ></div> </div> </div> </template> |