HTML eMail rendering issue

I belive the html sanitization comes into effect, but not sure

I'm using below output syntax to the eMail action

{{#ishighuse}} <td bgcolor="Tomato">{{jvminuse}} {{/ishighuse}}

bgcolor setting is not set and always get

28 (28 is a sample value)

If it sanitization issue, what are the elements that sanitization excludes, and how I can set specific elements to be allowed? (or) please advice if I'm missing something

NOTE 1 : cellpadding, cellspacing , border are allowed at TABLE element level

NOTE 2 : Validated that "ishighuse" is true and ensure that the logic passes thru the condition with temporary values.

Hey,

can you try to enable _styles for the HTML sanitizer, and use <td style='background-color: red'> and see if that works?

See https://www.elastic.co/guide/en/x-pack/6.2/actions-email.html#email-html-sanitization and https://www.elastic.co/guide/en/elasticsearch/reference/6.2/notification-settings.html#html-feature-groups

--Alex

Hi Alexander,

Adding the below entry alone didn't work
xpack.notification.email.html.sanitization:
allow: _styles

But, when I added below, it worked
xpack.notification.email.html.sanitization:
allow: _styles,_tables,_blocks,_links,_formatting
NOTE: _blocks,_links may not be required
Probably I'm misinterpreting documentation. I didn't explicitly added _tables etc. initially as the documentation specified "By default, Watcher allows the following features: body, head, _tables, _links, _blocks, _formatting and img:embedded" -- https://www.elastic.co/guide/en/x-pack/6.2/actions-email.html#email-html-sanitization

Thanks for your help.

Hey,

the option requires you to set all the allowed options at once, so it makes sense that your second try worked, not your first.

Hope that helps!

--Alex

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.