Commit eb0d5baa authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch '340036-replace-v-html' into 'master'

Replaces v-html with v-safe-html

See merge request gitlab-org/gitlab!70521
parents 7c2fbd9e 81a7124c
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import { GlTable, GlLink, GlIcon, GlAvatarLink, GlAvatar, GlTooltipDirective } from '@gitlab/ui'; import { GlTable, GlLink, GlIcon, GlAvatarLink, GlAvatar, GlTooltipDirective } from '@gitlab/ui';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { sanitize } from '~/lib/dompurify';
import { getTimeago } from '~/lib/utils/datetime_utility'; import { getTimeago } from '~/lib/utils/datetime_utility';
import { __, sprintf, n__ } from '~/locale'; import { __, sprintf, n__ } from '~/locale';
import ApproversColumn from './approvers_column.vue'; import ApproversColumn from './approvers_column.vue';
...@@ -40,7 +39,7 @@ export default { ...@@ -40,7 +39,7 @@ export default {
return n__('1 hour', '%d hours', hours); return n__('1 hour', '%d hours', hours);
} }
return sanitize(__('&lt; 1 hour'), { ALLOWED_TAGS: [] }); return sprintf(__('%{lessThan} 1 hour'), { lessThan: '<' }, false);
}, },
}, },
tableHeaderFields: [ tableHeaderFields: [
...@@ -118,7 +117,7 @@ export default { ...@@ -118,7 +117,7 @@ export default {
<template #cell(review_time)="{ value }"> <template #cell(review_time)="{ value }">
<template v-if="showReviewTime(value)"> <template v-if="showReviewTime(value)">
<span v-html="formatReviewTime(value) /* eslint-disable-line vue/no-v-html */"></span> <span v-text="formatReviewTime(value)"></span>
</template> </template>
<template v-else> &ndash; </template> <template v-else> &ndash; </template>
</template> </template>
......
...@@ -694,6 +694,9 @@ msgstr "" ...@@ -694,6 +694,9 @@ msgstr ""
msgid "%{label_for_message} unavailable" msgid "%{label_for_message} unavailable"
msgstr "" msgstr ""
msgid "%{lessThan} 1 hour"
msgstr ""
msgid "%{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end} is a free, automated, and open certificate authority (CA) that issues digital certificates to enable HTTPS (SSL/TLS) for sites." msgid "%{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end} is a free, automated, and open certificate authority (CA) that issues digital certificates to enable HTTPS (SSL/TLS) for sites."
msgstr "" msgstr ""
...@@ -1054,9 +1057,6 @@ msgstr "" ...@@ -1054,9 +1057,6 @@ msgstr ""
msgid "%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}v*%{code_tag_end} or %{code_tag_start}*-release%{code_tag_end} are supported." msgid "%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}v*%{code_tag_end} or %{code_tag_start}*-release%{code_tag_end} are supported."
msgstr "" msgstr ""
msgid "&lt; 1 hour"
msgstr ""
msgid "'%{data}' at %{location} does not match format: %{format}" msgid "'%{data}' at %{location} does not match format: %{format}"
msgstr "" msgstr ""
......
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