Skip to content

Commit

Permalink
Fix DABBLE-ME-54
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Jan 10, 2024
1 parent b9954ba commit b61c1f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/lib/email_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,11 @@ def clean_html_version(html)
html = html.split('<br id="lineBreakAtBeginningOfSignature">').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("<br>--<br>").first # strip out gmail signature
html = html.presence || ""
html = html.split("<div><br></div>\n<div>--</div>").first # strip out gmail signature
html = html.presence || ""
html = html.split("<br>--").first # strip out gmail signature
html = html.presence || ""
html = html.split("<br>\n--").first # strip out gmail signature
html&.gsub!(/\A<br\s*\/?>/, "") # remove <br> from very beginning of html
html&.gsub!(/<div style="display:none;border:0px;width:0px;height:0px;overflow:hidden;">.+<\/div>/, "") # remove hidden divs / tracking pixels
Expand Down

0 comments on commit b61c1f2

Please sign in to comment.