diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-08 00:08:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-08 00:08:27 +0300 |
commit | 4df2fd43039fb3f09086525501db071790e1699f (patch) | |
tree | 9af966dc861351d7a7d97dd9f6a586d5700a63d3 /app/assets/javascripts/vue_shared/components/markdown | |
parent | c2bdb9d02768a61bee7560113f4d4c83dc91338e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/markdown')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/markdown/field.vue | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/field.vue b/app/assets/javascripts/vue_shared/components/markdown/field.vue index 179ac2fc57f..722df3cc58b 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/field.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/field.vue @@ -1,5 +1,5 @@ <script> -import { GlIcon } from '@gitlab/ui'; +import { GlIcon, GlSafeHtmlDirective } from '@gitlab/ui'; import $ from 'jquery'; import '~/behaviors/markdown/render_gfm'; import { debounce, unescape } from 'lodash'; @@ -24,6 +24,9 @@ export default { GlIcon, Suggestions, }, + directives: { + SafeHtml: GlSafeHtmlDirective, + }, mixins: [glFeatureFlagsMixin()], props: { /** @@ -308,6 +311,9 @@ export default { ); }, }, + safeHtmlConfig: { + ADD_TAGS: ['gl-emoji'], + }, }; </script> @@ -369,19 +375,19 @@ export default { <div v-show="previewMarkdown" ref="markdown-preview" + v-safe-html:[$options.safeHtmlConfig]="markdownPreview" class="js-vue-md-preview md md-preview-holder" - v-html="markdownPreview /* eslint-disable-line vue/no-v-html */" ></div> </template> <div v-if="referencedCommands && previewMarkdown && !markdownPreviewLoading" + v-safe-html:[$options.safeHtmlConfig]="referencedCommands" class="referenced-commands" data-testid="referenced-commands" - v-html="referencedCommands /* eslint-disable-line vue/no-v-html */" ></div> <div v-if="shouldShowReferencedUsers" class="referenced-users"> <gl-icon name="warning-solid" /> - <span v-html="addMultipleToDiscussionWarning /* eslint-disable-line vue/no-v-html */"></span> + <span v-safe-html:[$options.safeHtmlConfig]="addMultipleToDiscussionWarning"></span> </div> </div> </template> |