diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/assets/javascripts/badges | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/assets/javascripts/badges')
-rw-r--r-- | app/assets/javascripts/badges/components/badge_form.vue | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/badges/components/badge_form.vue b/app/assets/javascripts/badges/components/badge_form.vue index 7e605099655..2c7e878f044 100644 --- a/app/assets/javascripts/badges/components/badge_form.vue +++ b/app/assets/javascripts/badges/components/badge_form.vue @@ -1,6 +1,5 @@ <script> -/* eslint-disable vue/no-v-html */ -import { GlLoadingIcon, GlFormInput, GlFormGroup, GlButton } from '@gitlab/ui'; +import { GlLoadingIcon, GlFormInput, GlFormGroup, GlButton, GlSafeHtmlDirective } from '@gitlab/ui'; import { escape, debounce } from 'lodash'; import { mapActions, mapState } from 'vuex'; import createFlash from '~/flash'; @@ -19,6 +18,9 @@ export default { GlFormInput, GlFormGroup, }, + directives: { + SafeHtml: GlSafeHtmlDirective, + }, props: { isEditing: { type: Boolean, @@ -168,6 +170,7 @@ export default { }); }, }, + safeHtmlConfig: { ALLOW_TAGS: ['a', 'code'] }, }; </script> @@ -184,7 +187,7 @@ export default { <div class="form-group"> <label for="badge-link-url" class="label-bold">{{ s__('Badges|Link') }}</label> - <p v-html="helpText"></p> + <p v-safe-html:[$options.safeHtmlConfig]="helpText"></p> <input id="badge-link-url" v-model="linkUrl" @@ -199,7 +202,7 @@ export default { <div class="form-group"> <label for="badge-image-url" class="label-bold">{{ s__('Badges|Badge image URL') }}</label> - <p v-html="helpText"></p> + <p v-safe-html:[$options.safeHtmlConfig]="helpText"></p> <input id="badge-image-url" v-model="imageUrl" |