Commit a6b764b6 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'fix/332841-remove-v-html-form-searchable-dropdown-vue' into 'master'

fix: issue 332841 remove v-html from searchable_dropdown.vue

See merge request gitlab-org/gitlab!64474
parents 6311f4e8 c2d574bc
<script> <script>
import { GlDropdownItem, GlAvatar } from '@gitlab/ui'; import { GlDropdownItem, GlAvatar, GlSafeHtmlDirective as SafeHtml } 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';
...@@ -9,6 +9,9 @@ export default { ...@@ -9,6 +9,9 @@ export default {
GlDropdownItem, GlDropdownItem,
GlAvatar, GlAvatar,
}, },
directives: {
SafeHtml,
},
props: { props: {
item: { item: {
type: Object, type: Object,
...@@ -62,8 +65,7 @@ export default { ...@@ -62,8 +65,7 @@ export default {
:size="32" :size="32"
/> />
<div class="gl-display-flex gl-flex-direction-column"> <div class="gl-display-flex gl-flex-direction-column">
<!-- eslint-disable-next-line vue/no-v-html --> <span v-safe-html="highlightedItemName" data-testid="item-title"></span>
<span data-testid="item-title" v-html="highlightedItemName">{{ item[name] }}</span>
<span class="gl-font-sm gl-text-gray-700" data-testid="item-namespace">{{ <span class="gl-font-sm gl-text-gray-700" data-testid="item-namespace">{{
truncatedNamespace truncatedNamespace
}}</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