mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Added option to skip quoted text for rule condition text contains
This commit is contained in:
@@ -338,6 +338,7 @@ public class EntityRule {
|
||||
if (jbody != null) {
|
||||
String value = jbody.getString("value");
|
||||
boolean regex = jbody.getBoolean("regex");
|
||||
boolean skip_quotes = jbody.optBoolean("skip_quotes");
|
||||
|
||||
if (!regex)
|
||||
value = value.replaceAll("\\s+", " ");
|
||||
@@ -355,7 +356,8 @@ public class EntityRule {
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_rule_no_body));
|
||||
|
||||
Document d = JsoupEx.parse(html);
|
||||
//d.select("blockquote").remove();
|
||||
if (skip_quotes)
|
||||
d.select("blockquote").remove();
|
||||
String text = d.body().text();
|
||||
if (!matches(context, message, value, text, regex))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user