Commit c2d574bc authored by Jeremy Wu's avatar Jeremy Wu Committed by Kushal Pandya

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

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