Commit 3aefe1d1 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '241937-Replace-v-html' into 'master'

Replace v-html with v-safe-html in card_security_discover_app.vue

See merge request gitlab-org/gitlab!41139
parents c78115d4 300943e7
<script> <script>
/* eslint-disable vue/no-v-html */ import {
import { GlButton, GlTooltipDirective, GlCarousel, GlCarouselSlide } from '@gitlab/ui'; GlButton,
GlTooltipDirective,
GlCarousel,
GlCarouselSlide,
GlSprintf,
GlLink,
} from '@gitlab/ui';
import securityDependencyImageUrl from 'ee_images/promotions/security-dependencies.png'; import securityDependencyImageUrl from 'ee_images/promotions/security-dependencies.png';
import securityScanningImageUrl from 'ee_images/promotions/security-scanning.png'; import securityScanningImageUrl from 'ee_images/promotions/security-scanning.png';
import securityDashboardImageUrl from 'ee_images/promotions/security-dashboard.png'; import securityDashboardImageUrl from 'ee_images/promotions/security-dashboard.png';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import { sprintf, s__ } from '~/locale'; import { s__ } from '~/locale';
export default { export default {
directives: { directives: {
...@@ -15,6 +21,8 @@ export default { ...@@ -15,6 +21,8 @@ export default {
GlButton, GlButton,
GlCarousel, GlCarousel,
GlCarouselSlide, GlCarouselSlide,
GlSprintf,
GlLink,
}, },
mixins: [Tracking.mixin()], mixins: [Tracking.mixin()],
props: { props: {
...@@ -110,14 +118,8 @@ export default { ...@@ -110,14 +118,8 @@ export default {
), ),
}, },
], ],
discoverPlanCaption: sprintf( discoverPlanCaption: s__(
s__('Discover|See the other features of the %{linkStart}gold plan%{linkEnd}'), 'Discover|See the other features of the %{linkStart}gold plan%{linkEnd}',
{
linkStart:
'<a href="https://about.gitlab.com/pricing/saas/feature-comparison/" target="_blank" rel="noopener noreferrer">',
linkEnd: '</a>',
},
false,
), ),
}, },
}; };
...@@ -160,13 +162,24 @@ export default { ...@@ -160,13 +162,24 @@ export default {
:key="index" :key="index"
img-blank img-blank
> >
<p class="gl-text-gray-900 text-left"> <p class="gl-text-gray-900 gl-text-left">
{{ caption }} {{ caption }}
</p> </p>
</gl-carousel-slide> </gl-carousel-slide>
</gl-carousel> </gl-carousel>
<div class="discover-footer d-flex flex-nowrap flex-row justify-content-between mx-auto my-0"> <div class="discover-footer d-flex flex-nowrap flex-row justify-content-between mx-auto my-0">
<p class="gl-text-gray-900 text-left mb-5" v-html="$options.i18n.discoverPlanCaption"></p> <p class="gl-text-gray-900 text-left mb-5">
<gl-sprintf :message="$options.i18n.discoverPlanCaption">
<template #link="{ content }">
<gl-link
href="https://about.gitlab.com/pricing/saas/feature-comparison/"
target="_blank"
>
{{ content }}
</gl-link>
</template>
</gl-sprintf>
</p>
</div> </div>
<div class="discover-buttons d-flex flex-nowrap flex-row justify-content-between mx-auto my-0"> <div class="discover-buttons d-flex flex-nowrap flex-row justify-content-between mx-auto my-0">
<gl-button <gl-button
......
---
title: Replace v-html with v-safe-html in card_security_discover_app.vue
merge_request: 41139
author: Kev @KevSlashNull
type: other
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