Hey,

I thought this might warrant a conversation. At the moment (in lines 398,405 & 412 of `maestro.module`) the module is adding a safe utility markup check on the message body for assignment, reminder and escalation notifications.

Drupal by default prevents any HTML from being used in emails. The way around that is to use a third-party module which *does* allow HTML such as SMTP Authentication Support. At the moment, Maestro is preventing any HTML from being passed to the email handler regardless of whether the site admin has chosen to allow it or not.

I would argue that Maestro shouldn't be applying the safe utility check on message body as the content is being added by an authenticated and approved user, not by anon users (unless there is a problem with a site's permission setup). Plus content is being checked further along the line anyway by Drupal core.

It might be there is another way to use HTML tags in notification emails which I've not seen (in which case, please let me know!) but I've added a simple patch below which simply passes the admin's content to the message body which can then be themed elsewhere without interference.

CommentFileSizeAuthor
html-friendly-notifications.patch1.49 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

JackWillDavis created an issue. See original summary.

_randy’s picture

Hi Jack,

The only other way would be to use a hook mail alter to pop in your own non-checkPlain'ed email body.

However, I do believe the addition of checkPlain was done early on in Maestro's development.
I don't have a problem removing that checkPlain. I'm a little behind on patches right now, but hopefully in September I can get caught up. I think this shouldn't be a problem to remove and for your use cases, you can probably go ahead and remove them locally an the dev and future releases will have the checkPlain removed.

  • _randy committed c910aca on 8.x-2.x authored by JackWillDavis
    Issue #3076536 by JackWillDavis: Should Maestro be stripping out HTML...
_randy’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.