Non-HTML alerts still use HTML escaping

Hi All,

Has anyone noticed that when you have “Use HTML emails” turned off in Settings->Alerting->Email HTML escaping is still applied to the body of alerts ? For example:

Message: WARNING - Certificate 'mydomain.org' expires in 21
day(s) (Tue 22 Jun 2021 23:59:59 GMT +0000).

This can make some alerts difficult to read. I did try using htmlspecialchars_decode() in the alert template to convert from HTML escaped text back to normal text but it made no difference so I can only assume that LibreNMS runs all alert text through htmlspecialchars() after the template processing is done, regardless of whether HTML emails is enabled or not.

Is this a bug or something that hasn’t been considered before ?

As well as non-HTML email alerts I also use pushover, and the alert text sent to the pushover client also includes HTML escaping despite it not even being an email.

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