Commit 06eb502b authored by Illya Klymov's avatar Illya Klymov

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

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

See merge request gitlab-org/gitlab!41202
parents 024c2993 ebfde22e
<script> <script>
/* eslint-disable vue/no-v-html */
/* /*
* This is tightly coupled to projects/issues/_issue.html.haml, * This is tightly coupled to projects/issues/_issue.html.haml,
* any changes done to the haml need to be reflected here. * any changes done to the haml need to be reflected here.
...@@ -7,7 +6,14 @@ ...@@ -7,7 +6,14 @@
// TODO: need to move this component to graphql - https://gitlab.com/gitlab-org/gitlab/-/issues/221246 // TODO: need to move this component to graphql - https://gitlab.com/gitlab-org/gitlab/-/issues/221246
import { escape, isNumber } from 'lodash'; import { escape, isNumber } from 'lodash';
import { GlLink, GlTooltipDirective as GlTooltip, GlSprintf, GlLabel, GlIcon } from '@gitlab/ui'; import {
GlLink,
GlTooltipDirective as GlTooltip,
GlSprintf,
GlLabel,
GlIcon,
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui';
import jiraLogo from '@gitlab/svgs/dist/illustrations/logos/jira.svg'; import jiraLogo from '@gitlab/svgs/dist/illustrations/logos/jira.svg';
import { import {
dateInWords, dateInWords,
...@@ -42,6 +48,7 @@ export default { ...@@ -42,6 +48,7 @@ export default {
}, },
directives: { directives: {
GlTooltip, GlTooltip,
SafeHtml,
}, },
mixins: [glFeatureFlagsMixin()], mixins: [glFeatureFlagsMixin()],
props: { props: {
...@@ -299,9 +306,9 @@ export default { ...@@ -299,9 +306,9 @@ export default {
<span class="js-ref-path gl-mr-4 mr-sm-0"> <span class="js-ref-path gl-mr-4 mr-sm-0">
<span <span
v-if="isJiraIssue" v-if="isJiraIssue"
v-safe-html="jiraLogo"
class="svg-container jira-logo-container" class="svg-container jira-logo-container"
data-testid="jira-logo" data-testid="jira-logo"
v-html="jiraLogo"
></span> ></span>
{{ referencePath }} {{ referencePath }}
</span> </span>
......
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