diff --git a/src/destination/destinationHandlers/sesHandler.ts b/src/destination/destinationHandlers/sesHandler.ts index e88743b..b5eb8c7 100644 --- a/src/destination/destinationHandlers/sesHandler.ts +++ b/src/destination/destinationHandlers/sesHandler.ts @@ -182,13 +182,13 @@ export class SESService implements Handler { if(event.eventTypeId===4 || event.eventTypeId === EVENT_TYPE.ImagePromotion){ let commentDisplayStyle = (event.payload.imageComment === "") ? 'none' : 'inline'; let tagDisplayStyle = (event.payload.imageTagNames === null) ? 'none' : 'inline'; - json = Mustache.render(Mustache.escape(template), { ...parsedEvent, commentDisplayStyle ,tagDisplayStyle}); + json = Mustache.render(template, { ...parsedEvent, commentDisplayStyle ,tagDisplayStyle}); }else if(event.eventTypeId===5){ let commentDisplayStyle = (event.payload.protectConfigComment === "") ? 'none' : 'inline'; - json = Mustache.render(Mustache.escape(template), { ...parsedEvent, commentDisplayStyle }); + json = Mustache.render(template, { ...parsedEvent, commentDisplayStyle }); } else{ - json = Mustache.render(Mustache.escape(template), parsedEvent) + json = Mustache.render(template, parsedEvent) } const res = await sdk.send( diff --git a/src/destination/destinationHandlers/slackHandler.ts b/src/destination/destinationHandlers/slackHandler.ts index daf592f..7fe7920 100644 --- a/src/destination/destinationHandlers/slackHandler.ts +++ b/src/destination/destinationHandlers/slackHandler.ts @@ -130,10 +130,10 @@ export class SlackService implements Handler { if (event.eventTypeId == EVENT_TYPE.ScoopNotification){ const date = moment(event.eventTime); event.payload.scoopNotificationConfig.data.interceptedAt = date.unix(); - jsons = Mustache.render(Mustache.escape(template), event.payload.scoopNotificationConfig.data); + jsons = Mustache.render(template, event.payload.scoopNotificationConfig.data); }else{ let parsedEvent = this.mh.parseEvent(event as Event, true); - jsons = Mustache.render(Mustache.escape(template), parsedEvent); + jsons = Mustache.render(template, parsedEvent); } let j = JSON.parse(jsons) diff --git a/src/destination/destinationHandlers/smtpHandler.ts b/src/destination/destinationHandlers/smtpHandler.ts index 557446b..1b27d51 100644 --- a/src/destination/destinationHandlers/smtpHandler.ts +++ b/src/destination/destinationHandlers/smtpHandler.ts @@ -199,12 +199,12 @@ export class SMTPService implements Handler { if(event.eventTypeId===4){ let commentDisplayStyle = (event.payload.imageComment === "") ? 'none' : 'inline'; let tagDisplayStyle = (event.payload.imageTagNames === null) ? 'none' : 'inline'; - json = Mustache.render(Mustache.escape(template), { ...parsedEvent, commentDisplayStyle ,tagDisplayStyle}); + json = Mustache.render(template, { ...parsedEvent, commentDisplayStyle ,tagDisplayStyle}); }else if(event.eventTypeId===5){ let commentDisplayStyle = (event.payload.protectConfigComment === "") ? 'none' : 'inline'; - json = Mustache.render(Mustache.escape(template), { ...parsedEvent, commentDisplayStyle }); + json = Mustache.render(template, { ...parsedEvent, commentDisplayStyle }); }else{ - json = Mustache.render(Mustache.escape(template), parsedEvent) + json = Mustache.render(template, parsedEvent) } const res = await sdk.send( { diff --git a/src/destination/destinationHandlers/webhookHandler.ts b/src/destination/destinationHandlers/webhookHandler.ts index 720a883..3210b30 100644 --- a/src/destination/destinationHandlers/webhookHandler.ts +++ b/src/destination/destinationHandlers/webhookHandler.ts @@ -113,10 +113,10 @@ export class WebhookService implements Handler{ if (event.eventTypeId == EVENT_TYPE.ScoopNotification){ const date = moment(event.eventTime); event.payload.scoopNotificationConfig.data.interceptedAt = date.unix(); - jsons = Mustache.render(Mustache.escape(template), event.payload.scoopNotificationConfig.data); + jsons = Mustache.render(template, event.payload.scoopNotificationConfig.data); }else { let parsedEvent = this.mh.parseEventForWebhook(event as Event); - jsons = Mustache.render(Mustache.escape(template), parsedEvent); + jsons = Mustache.render(template, parsedEvent); } let j = JSON.parse(jsons);