From b61c1f2cd989831c86ebd9ee5f19cf14eb2bf2b2 Mon Sep 17 00:00:00 2001 From: Paul Arterburn Date: Wed, 10 Jan 2024 14:19:00 -0700 Subject: [PATCH] Fix DABBLE-ME-54 --- app/lib/email_processor.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/lib/email_processor.rb b/app/lib/email_processor.rb index 137c0ee1..871930e5 100644 --- a/app/lib/email_processor.rb +++ b/app/lib/email_processor.rb @@ -332,8 +332,11 @@ def clean_html_version(html) html = html.split('
').first # strip out gmail signature html = ActionController::Base.helpers.sanitize(html, tags: %w(strong em a div span ul ol li b i br p hr u em blockquote), attributes: %w(href target)) html = html.split("
--
").first # strip out gmail signature + html = html.presence || "" html = html.split("

\n
--
").first # strip out gmail signature + html = html.presence || "" html = html.split("
--").first # strip out gmail signature + html = html.presence || "" html = html.split("
\n--").first # strip out gmail signature html&.gsub!(/\A/, "") # remove
from very beginning of html html&.gsub!(/
.+<\/div>/, "") # remove hidden divs / tracking pixels