Html field for email

I was trying to set the html for the email alerting in watcher. What I did is to copy and paste my html code into the body.html field. But it caused some indent problems that the system could not recognize it is a valid html. So I just typed my html code into one whole long line at that filed and it worked fine for some simple html. When it was involved some complicated situations like img url or something like that. One whole long line of html code still cause the invalid warning. Is there any way to efficiently input the html code to that field?

I suspect that the issue with img tags had to do with the quotation marks around src="...", etc. Did you try escaping those? (<img src="...") I do not know of a better way to input the value for that field at the moment.

You might be able to change the HTML sanitizer allow/deny settings to be able to write the HTML you want. See https://www.elastic.co/guide/en/x-pack/6.2/actions-email.html#email-html-sanitization

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