From d22ba55858878a68d9c709ce046db5abb02e119b Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 7 Mar 2017 19:27:33 -0500 Subject: [PATCH 1/2] Outputs transparent gif instead of red color --- lib/Statistics/Track/Opens.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Statistics/Track/Opens.php b/lib/Statistics/Track/Opens.php index 8b85e2da84..80cbef00a6 100644 --- a/lib/Statistics/Track/Opens.php +++ b/lib/Statistics/Track/Opens.php @@ -30,7 +30,7 @@ class Opens { if(!$display_image) return; // return 1x1 pixel transparent gif image header('Content-Type: image/gif'); - echo "\x47\x49\x46\x38\x37\x61\x1\x0\x1\x0\x80\x0\x0\xfc\x6a\x6c\x0\x0\x0\x2c\x0\x0\x0\x0\x1\x0\x1\x0\x0\x2\x2\x44\x1\x0\x3b"; + echo base64_decode('R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw=='); exit; } } \ No newline at end of file From 87b270482b624cad5680e395d46b7e5cb8220cb3 Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 8 Mar 2017 14:42:34 -0500 Subject: [PATCH 2/2] Fixes rules with colons (e.g, background-image: url(http://....);) from being incorrectly parsed --- lib/Util/CSS.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Util/CSS.php b/lib/Util/CSS.php index 5ebbd9890f..05757cb56b 100644 --- a/lib/Util/CSS.php +++ b/lib/Util/CSS.php @@ -160,8 +160,8 @@ class CSS { continue; } - $key_value = explode(':', $kv); - $array[trim($key_value[0])] = trim($key_value[1]); + list($selector, $rule) = explode(':', $kv, 2); + $array[trim($selector)] = trim($rule); } return $array;