• Resolved Prometheus Fire

    (@prometheus-fire)


    We are getting CSS leaking into emails from various plugins. This screenshot is an email from BuddyBoss. But we are also seeing in with other plugins as well.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @prometheus-fire,

    Thanks for reaching us,

    Hope you are doing well, To escalate your case, please create a ticket on our official website so that we can connect you directly with our Technical team.

    Looking forward to getting your issue resolved.

    Thanks & Regards
    WP Experts Support Team

    @prometheus-fire What was the resolution to this? I’m having this problem as well.

    @hamza1010 If you are closing an issue you should post the solution as well.

    Thread Starter Prometheus Fire

    (@prometheus-fire)

    @ofarrellaudio I didn’t solve it, and ended up no longer using the plugin, sadly.

    @prometheus-fire Oh, that’s a bummer. I’ve been using this plugin for a while on various sites and have just recently run into this problem. Thanks for the update.

    What did you switch to?

    Thread Starter Prometheus Fire

    (@prometheus-fire)

    @ofarrellaudio I never found an alternative, I just ended up going without branded emails.

    I should say, however, I have another client that has been using this plugin for a couple years now and we aren’t having the CSS injection problem. I did do a plugin conflict check on the site where we have the problem, but I never figured out why it was happening.

    @prometheus-fire I went digging in the codebase and figured out what is going on with this…

    Certain plugins (the one I’m currently struggling with is Event Tickets) send a full HTML document for their HTML emails. However, this plugin (Email Templates) also creates a full HTML document and then just intercepts whatever is being sent through the wp_mail function and wraps it in their template.

    That’s all well and good, but you don’t want to send an email that has an HTML document wrapped in another HTML document inside it. So they run the email content through the wp_kses_post function which strips certain html tags including <style> tags. That is what is causing the styles to print in plain text.

    It plays well with WooCommerce but doesn’t seem to play well with most other things that send out HTML emails that would have <style> tags in them.

    I did figure out a hacky solution where I’m grabbing the email content before they filter it (using their own mailtpl/email_content hook). I’m grabbing the email content and storing it to a txt file on the server and then re-injecting it from that file after all of their filtering runs. I do some similar filtering to theirs, but leave the <style> tags untouched. It’s hacky but it works.

    @prometheus-fire If you’re curious, this is that code rolled into a simple plugin…

    https://gist.github.com/reggieofarrell/3151943d93c739550873f371c9f176c9

    Tamsin Carter

    (@tamsin-carter)

    Is there any update on this please? I have looked on your site to post in support there but it just brings me back here.

    Plugin Support Daniyal Raza

    (@daniyalraza01)

    Hello @tamsin-carter ,

    This plugin update is about to release in couple of days. You will get this thing resolve in that update.

    In case, if you still face any issues after update then we will help you out.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.