Commit 892e3379 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'djadmin-v-html-3' into 'master'

Switch to v-safe-html in iteration reports

See merge request gitlab-org/gitlab!70239
parents 5be3bcf1 09c79ed9
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
GlIcon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
GlModal, GlModal,
GlSafeHtmlDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
import BurnCharts from 'ee/burndown_chart/components/burn_charts.vue'; import BurnCharts from 'ee/burndown_chart/components/burn_charts.vue';
import { TYPE_ITERATION } from '~/graphql_shared/constants'; import { TYPE_ITERATION } from '~/graphql_shared/constants';
...@@ -33,6 +34,9 @@ export default { ...@@ -33,6 +34,9 @@ export default {
IterationReportTabs, IterationReportTabs,
TimeboxStatusBadge, TimeboxStatusBadge,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
apollo: { apollo: {
iteration: { iteration: {
query, query,
...@@ -117,6 +121,7 @@ export default { ...@@ -117,6 +121,7 @@ export default {
}); });
}, },
}, },
safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
}; };
</script> </script>
...@@ -178,7 +183,7 @@ export default { ...@@ -178,7 +183,7 @@ export default {
<h3 ref="title" class="page-title">{{ iteration.title }}</h3> <h3 ref="title" class="page-title">{{ iteration.title }}</h3>
<div <div
ref="description" ref="description"
v-html="iteration.descriptionHtml /* eslint-disable-line vue/no-v-html */" v-safe-html:[$options.safeHtmlConfig]="iteration.descriptionHtml"
></div> ></div>
<burn-charts <burn-charts
:start-date="iteration.startDate" :start-date="iteration.startDate"
......
...@@ -8,6 +8,7 @@ import { ...@@ -8,6 +8,7 @@ import {
GlIcon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
GlModal, GlModal,
GlSafeHtmlDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
import BurnCharts from 'ee/burndown_chart/components/burn_charts.vue'; import BurnCharts from 'ee/burndown_chart/components/burn_charts.vue';
import { TYPE_ITERATION } from '~/graphql_shared/constants'; import { TYPE_ITERATION } from '~/graphql_shared/constants';
...@@ -47,6 +48,9 @@ export default { ...@@ -47,6 +48,9 @@ export default {
IterationReportTabs, IterationReportTabs,
GlModal, GlModal,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
apollo: { apollo: {
iteration: { iteration: {
query, query,
...@@ -205,6 +209,7 @@ export default { ...@@ -205,6 +209,7 @@ export default {
}); });
}, },
}, },
safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
}; };
</script> </script>
...@@ -276,7 +281,7 @@ export default { ...@@ -276,7 +281,7 @@ export default {
<h3 ref="title" class="page-title">{{ iteration.title }}</h3> <h3 ref="title" class="page-title">{{ iteration.title }}</h3>
<div <div
ref="description" ref="description"
v-html="iteration.descriptionHtml /* eslint-disable-line vue/no-v-html */" v-safe-html:[$options.safeHtmlConfig]="iteration.descriptionHtml"
></div> ></div>
<burn-charts <burn-charts
:start-date="iteration.startDate" :start-date="iteration.startDate"
......
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