Highlights in email HTML body

alerting

#1

I tried to include highlighted fragments into HTML email but highlighting tags were lost somewhere :frowning:

In ctx.payload.hits.hits[].text there is text correctly highlighted by <em> tags but finally in e-mail body these tags disappeared.

Body is rendered by "body.html" xmustache template using following code inside

{{#ctx.payload.hits.hits}}
        {{#highlight.text}}<p>{{{.}}}</p>{{/highlight.text}}
{{/ctx.payload.hits.hits}}

Somewhere on the way from payload to email body <em> tags disappears.


#2

My strange problems with HTML body email was solved by following setting

watcher.actions.email.sanitize_html: false

(Uri Boness) #3

Hi,

sorry for not picking this up on time.

yes, current the html sanitizer doesn't allow <em> tags... but that should not be the case... we'll fix it in our next release.

Thx for reporting!


(system) #4