Commit e0a77720 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'djamdin-safe-html-ide-error-message' into 'master'

Switch to v-safe-html for IDE error messages

See merge request gitlab-org/gitlab!69827
parents 93a4df7a c9f22f82
<script> <script>
import { GlAlert, GlLoadingIcon } from '@gitlab/ui'; import { GlAlert, GlLoadingIcon, GlSafeHtmlDirective } from '@gitlab/ui';
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
export default { export default {
...@@ -7,6 +7,9 @@ export default { ...@@ -7,6 +7,9 @@ export default {
GlAlert, GlAlert,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
props: { props: {
message: { message: {
type: Object, type: Object,
...@@ -55,7 +58,7 @@ export default { ...@@ -55,7 +58,7 @@ export default {
@dismiss="dismiss" @dismiss="dismiss"
@primaryAction="doAction" @primaryAction="doAction"
> >
<span v-html="message.text /* eslint-disable-line vue/no-v-html */"></span> <span v-safe-html="message.text"></span>
<gl-loading-icon v-show="isLoading" size="sm" inline class="vertical-align-middle ml-1" /> <gl-loading-icon v-show="isLoading" size="sm" inline class="vertical-align-middle ml-1" />
</gl-alert> </gl-alert>
</template> </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