From 5e4894a91669e2e0e841b94146b04d667496c7a8 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 15 Nov 2013 08:20:21 -0500
Subject: [PATCH] Fix bgcolor attribute handling

---
 program/steps/mail/func.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 78a977b..8164592 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1342,9 +1342,9 @@
   if (preg_match($regexp, $body, $m)) {
     $attrs = $m[0];
     // Get bgcolor, we'll set it as background-color of the message container
-    if ($m[1] && preg_match('/bgcolor=["\']*([a-z0-9#]+)["\']*/', $attrs, $mb)) {
+    if ($m[1] && preg_match('/bgcolor=["\']*([a-z0-9#]+)["\']*/i', $attrs, $mb)) {
       $attributes['background-color'] = $mb[1];
-      $attrs = preg_replace('/bgcolor=["\']*([a-z0-9#]+)["\']*/', '', $attrs);
+      $attrs = preg_replace('/bgcolor=["\']*[a-z0-9#]+["\']*/i', '', $attrs);
     }
     // Get background, we'll set it as background-image of the message container
     if ($m[1] && preg_match('/background=["\']*([^"\'>\s]+)["\']*/', $attrs, $mb)) {

--
Gitblit v1.9.1