diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-29 20:25:22 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-29 20:25:22 +0400 |
commit | 9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e (patch) | |
tree | e68d476e7cd564a5462e697a7743da983aec3827 /src/expressions.c | |
parent | c4621d35aebaf9c6d466bf7a15a9de340b20b0ce (diff) | |
download | rspamd-9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e.tar.gz rspamd-9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e.zip |
* Add support for empty text or html parts
Diffstat (limited to 'src/expressions.c')
-rw-r--r-- | src/expressions.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expressions.c b/src/expressions.c index 9b3b9bf2f..83bceae7a 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -1532,7 +1532,7 @@ rspamd_is_html_balanced (struct worker_task *task, GList *args) cur = g_list_first (task->text_parts); while (cur) { p = cur->data; - if (p->is_html) { + if (!p->is_empty && p->is_html) { if (p->is_balanced) { res = TRUE; } @@ -1598,7 +1598,7 @@ rspamd_has_html_tag (struct worker_task *task, GList *args) while (cur && res == FALSE) { p = cur->data; - if (p->is_html && p->html_nodes) { + if (!p->is_empty && p->is_html && p->html_nodes) { g_node_traverse (p->html_nodes, G_PRE_ORDER, G_TRAVERSE_ALL, -1, search_html_node_callback, &cd); } cur = g_list_next (cur); @@ -1619,7 +1619,7 @@ rspamd_has_fake_html (struct worker_task *task, GList *args) while (cur && res == FALSE) { p = cur->data; - if (p->is_html && p->html_nodes == NULL) { + if (!p->is_empty && p->is_html && p->html_nodes == NULL) { res = TRUE; } cur = g_list_next (cur); |