Commit 4ee681d3 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'djadmin-v-html-highlight-js' into 'master'

Remove v-html from frequent items list component

See merge request gitlab-org/gitlab!72310
parents f736f85c 0f285e54
<script> <script>
/* eslint-disable vue/require-default-prop */ /* eslint-disable vue/require-default-prop */
import { GlButton } from '@gitlab/ui'; import { GlButton, GlSafeHtmlDirective } from '@gitlab/ui';
import highlight from '~/lib/utils/highlight'; import highlight from '~/lib/utils/highlight';
import { truncateNamespace } from '~/lib/utils/text_utility'; import { truncateNamespace } from '~/lib/utils/text_utility';
import { mapVuexModuleState } from '~/lib/utils/vuex_module_mappers'; import { mapVuexModuleState } from '~/lib/utils/vuex_module_mappers';
...@@ -14,6 +14,9 @@ export default { ...@@ -14,6 +14,9 @@ export default {
GlButton, GlButton,
ProjectAvatar, ProjectAvatar,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
mixins: [trackingMixin], mixins: [trackingMixin],
inject: ['vuexModule'], inject: ['vuexModule'],
props: { props: {
...@@ -73,9 +76,9 @@ export default { ...@@ -73,9 +76,9 @@ export default {
<div ref="frequentItemsItemMetadataContainer" class="frequent-items-item-metadata-container"> <div ref="frequentItemsItemMetadataContainer" class="frequent-items-item-metadata-container">
<div <div
ref="frequentItemsItemTitle" ref="frequentItemsItemTitle"
v-safe-html="highlightedItemName"
:title="itemName" :title="itemName"
class="frequent-items-item-title" class="frequent-items-item-title"
v-html="highlightedItemName /* eslint-disable-line vue/no-v-html */"
></div> ></div>
<div <div
v-if="namespace" v-if="namespace"
......
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