Check for attachments in the body only

This commit is contained in:
M66B 2019-11-26 09:47:53 +01:00
parent f2fa4800d7
commit d30cbb31ab
1 changed files with 5 additions and 2 deletions

View File

@ -3083,9 +3083,12 @@ public class FragmentCompose extends FragmentBase {
}
}
String plain = HtmlHelper.getText(body);
Document d = JsoupEx.parse(body);
d.select("div[fairemail=signature]").remove();
d.select("div[fairemail=reference]").remove();
String text = d.text();
for (String keyword : keywords)
if (plain.matches("(?si).*\\b" + Pattern.quote(keyword.trim()) + "\\b.*")) {
if (text.matches("(?si).*\\b" + Pattern.quote(keyword.trim()) + "\\b.*")) {
args.putBoolean("remind_attachment", true);
break;
}