summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/integrations/edit
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/assets/javascripts/integrations/edit
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
downloadgitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/assets/javascripts/integrations/edit')
-rw-r--r--app/assets/javascripts/integrations/edit/components/dynamic_field.vue18
-rw-r--r--app/assets/javascripts/integrations/edit/components/integration_form.vue2
2 files changed, 17 insertions, 3 deletions
diff --git a/app/assets/javascripts/integrations/edit/components/dynamic_field.vue b/app/assets/javascripts/integrations/edit/components/dynamic_field.vue
index 3655f94f06f..1fd4083b920 100644
--- a/app/assets/javascripts/integrations/edit/components/dynamic_field.vue
+++ b/app/assets/javascripts/integrations/edit/components/dynamic_field.vue
@@ -1,6 +1,12 @@
<script>
-/* eslint-disable vue/no-v-html */
-import { GlFormGroup, GlFormCheckbox, GlFormInput, GlFormSelect, GlFormTextarea } from '@gitlab/ui';
+import {
+ GlFormGroup,
+ GlFormCheckbox,
+ GlFormInput,
+ GlFormSelect,
+ GlFormTextarea,
+ GlSafeHtmlDirective as SafeHtml,
+} from '@gitlab/ui';
import { capitalize, lowerCase, isEmpty } from 'lodash';
import { mapGetters } from 'vuex';
import eventHub from '../event_hub';
@@ -14,6 +20,9 @@ export default {
GlFormSelect,
GlFormTextarea,
},
+ directives: {
+ SafeHtml,
+ },
props: {
choices: {
type: Array,
@@ -122,6 +131,9 @@ export default {
this.validated = true;
},
},
+ helpHtmlConfig: {
+ ADD_ATTR: ['target'], // allow external links, can be removed after https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1427 is implemented
+ },
};
</script>
@@ -133,7 +145,7 @@ export default {
:state="valid"
>
<template #description>
- <span v-html="help"></span>
+ <span v-safe-html:[$options.helpHtmlConfig]="help"></span>
</template>
<template v-if="isCheckbox">
diff --git a/app/assets/javascripts/integrations/edit/components/integration_form.vue b/app/assets/javascripts/integrations/edit/components/integration_form.vue
index 91f7c7dabf6..63f007170d0 100644
--- a/app/assets/javascripts/integrations/edit/components/integration_form.vue
+++ b/app/assets/javascripts/integrations/edit/components/integration_form.vue
@@ -86,7 +86,9 @@ export default {
},
},
helpHtmlConfig: {
+ ADD_ATTR: ['target'], // allow external links, can be removed after https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1427 is implemented
ADD_TAGS: ['use'], // to support icon SVGs
+ FORBID_ATTR: [], // This is trusted input so we can override the default config to allow data-* attributes
},
};
</script>