A platform for community discussion. Free, open, simple.
FIX: properly clean Thunderbird emails, don't remove links (#16543)
ValdikSSf7540aa52f1f
diff --git a/lib/email/receiver.rb b/lib/email/receiver.rbindex e03368a3616..ff01667ef19 100644--- a/lib/email/receiver.rb+++ b/lib/email/receiver.rb@@ -471,7 +471,9 @@ module Emaildef extract_from_mozilla(doc)# Mozilla (Thunderbird ?) properly identifies signature and forwarded emails# Remove them and anything that comes after- elided = doc.css("*[class^='moz-'], *[class^='moz-'] ~ *").remove+ elided = doc.css("*[class^='moz-cite'], *[class^='moz-cite'] ~ *, " \+ "*[class^='moz-signature'], *[class^='moz-signature'] ~ *, " \+ "*[class^='moz-forward'], *[class^='moz-forward'] ~ *").removeto_markdown(doc.to_html, elided.to_html)end