@@ -18,10 +18,7 @@ import Colorable from '../../mixins/colorable'
18
18
import Themeable from '../../mixins/themeable'
19
19
20
20
// Helpers
21
- import {
22
- escapeHTML ,
23
- getPropertyFromItem ,
24
- } from '../../util/helpers'
21
+ import { getPropertyFromItem } from '../../util/helpers'
25
22
26
23
// Types
27
24
import mixins from '../../util/mixins'
@@ -113,17 +110,17 @@ export default mixins(Colorable, Themeable).extend({
113
110
genFilteredText ( text : string ) {
114
111
text = text || ''
115
112
116
- if ( ! this . searchInput || this . noFilter ) return escapeHTML ( text )
113
+ if ( ! this . searchInput || this . noFilter ) return text
117
114
118
115
const { start, middle, end } = this . getMaskedCharacters ( text )
119
116
120
- return ` ${ escapeHTML ( start ) } ${ this . genHighlight ( middle ) } ${ escapeHTML ( end ) } `
117
+ return [ start , this . genHighlight ( middle ) , end ]
121
118
} ,
122
119
genHeader ( props : { [ key : string ] : any } ) : VNode {
123
120
return this . $createElement ( VSubheader , { props } , props . header )
124
121
} ,
125
- genHighlight ( text : string ) : string {
126
- return `< span class="v-list-item__mask"> ${ escapeHTML ( text ) } </span>`
122
+ genHighlight ( text : string ) {
123
+ return this . $createElement ( ' span' , { staticClass : 'v-list__tile__mask' } , text )
127
124
} ,
128
125
getMaskedCharacters ( text : string ) : {
129
126
start : string
@@ -202,13 +199,11 @@ export default mixins(Colorable, Themeable).extend({
202
199
: scopedSlot
203
200
} ,
204
201
genTileContent ( item : any , index = 0 ) : VNode {
205
- const innerHTML = this . genFilteredText ( this . getText ( item ) )
206
-
207
- return this . $createElement ( VListItemContent ,
208
- [ this . $createElement ( VListItemTitle , {
209
- domProps : { innerHTML } ,
210
- } ) ]
211
- )
202
+ return this . $createElement ( VListItemContent , [
203
+ this . $createElement ( VListItemTitle , [
204
+ this . genFilteredText ( this . getText ( item ) ) ,
205
+ ] ) ,
206
+ ] )
212
207
} ,
213
208
hasItem ( item : object ) {
214
209
return this . parsedItems . indexOf ( this . getValue ( item ) ) > - 1
0 commit comments