@@ -10,9 +10,6 @@ import ripple from '../../../directives/ripple'
10
10
// Mixins
11
11
import CalendarBase from './calendar-base'
12
12
13
- // Helpers
14
- import { escapeHTML } from '../../../util/helpers'
15
-
16
13
// Util
17
14
import props from '../util/props'
18
15
import {
@@ -116,7 +113,7 @@ export default CalendarBase.extend({
116
113
eventNameFunction ( ) : CalendarEventNameFunction {
117
114
return typeof this . eventName === 'function'
118
115
? this . eventName
119
- : ( event , timedEvent ) => escapeHTML ( event . input [ this . eventName as string ] as string || '' )
116
+ : ( event , timedEvent ) => event . input [ this . eventName as string ] as string || ''
120
117
} ,
121
118
eventModeFunction ( ) : CalendarEventOverlapMode {
122
119
return typeof this . eventOverlapMode === 'function'
@@ -303,16 +300,23 @@ export default CalendarBase.extend({
303
300
const eventSummary = ( ) => {
304
301
const name = this . eventNameFunction ( event , timedEvent )
305
302
if ( event . start . hasTime ) {
306
- const eventSummaryClass = 'v-event-summary'
307
303
if ( timedEvent ) {
308
304
const time = timeSummary ( )
309
- const delimiter = singline ? ', ' : '<br>'
305
+ const delimiter = singline ? ', ' : this . $createElement ( 'br' )
310
306
311
- return `<span class="${ eventSummaryClass } "><strong>${ name } </strong>${ delimiter } ${ time } </span>`
307
+ return this . $createElement ( 'span' , { staticClass : 'v-event-summary' } , [
308
+ this . $createElement ( 'strong' , [ name ] ) ,
309
+ delimiter ,
310
+ time ,
311
+ ] )
312
312
} else {
313
313
const time = formatTime ( event . start , true )
314
314
315
- return `<span class="${ eventSummaryClass } "><strong>${ time } </strong> ${ name } </span>`
315
+ return this . $createElement ( 'span' , { staticClass : 'v-event-summary' } , [
316
+ this . $createElement ( 'strong' , [ time ] ) ,
317
+ ' ' ,
318
+ name ,
319
+ ] )
316
320
}
317
321
}
318
322
@@ -345,13 +349,10 @@ export default CalendarBase.extend({
345
349
: [ this . genName ( eventSummary ) ]
346
350
)
347
351
} ,
348
- genName ( eventSummary : ( ) => string ) : VNode {
352
+ genName ( eventSummary : ( ) => string | VNode ) : VNode {
349
353
return this . $createElement ( 'div' , {
350
354
staticClass : 'pl-1' ,
351
- domProps : {
352
- innerHTML : eventSummary ( ) ,
353
- } ,
354
- } )
355
+ } , [ eventSummary ( ) ] )
355
356
} ,
356
357
genPlaceholder ( day : CalendarTimestamp ) : VNode {
357
358
const height = this . eventHeight + this . eventMarginBottom
0 commit comments