Skip to content

Commit

Permalink
remove <br> from very beginning of html
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Jan 8, 2024
1 parent e6a641d commit f7b71af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/lib/email_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def clean_html_version(html)
html = html.split("<div><br></div>\n<div>--</div>").first # strip out gmail signature
html = html.split("<br>--").first # strip out gmail signature
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
html&.gsub!(/src=\"cid\:\S+\"/, "src=\"\" style=\"display: none;\"") # remove attached images showing as broken inline images

Expand Down

0 comments on commit f7b71af

Please sign in to comment.