Skip to content

Commit

Permalink
strip signature
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Jan 8, 2024
1 parent 1e6a8bf commit f734cc7
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 @@ -346,6 +346,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 = html.split("<br id=\"lineBreakAtBeginningOfSignature\">").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 f734cc7

Please sign in to comment.