diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-16 17:30:03 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-16 17:30:03 +0400 |
commit | d19de7c6034b03309d84073c4e482f9fbcd3c349 (patch) | |
tree | efb0fd2a5e7db3a819607e557ffef9f70856741d /src/expressions.c | |
parent | d52c26c9d3cf915660d849c662fedd776268ec8a (diff) | |
download | rspamd-d19de7c6034b03309d84073c4e482f9fbcd3c349.tar.gz rspamd-d19de7c6034b03309d84073c4e482f9fbcd3c349.zip |
* Fix 'cc' urls parsing
* Add function has_fake_html for determine fake html parts (without any tags)
Diffstat (limited to 'src/expressions.c')
-rw-r--r-- | src/expressions.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/expressions.c b/src/expressions.c index 13b426ec7..9b3b9bf2f 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -46,6 +46,7 @@ gboolean rspamd_is_recipients_sorted (struct worker_task *task, GList *args); gboolean rspamd_compare_transfer_encoding (struct worker_task *task, GList *args); gboolean rspamd_is_html_balanced (struct worker_task *task, GList *args); gboolean rspamd_has_html_tag (struct worker_task *task, GList *args); +gboolean rspamd_has_fake_html (struct worker_task *task, GList *args); /* * List of internal functions of rspamd @@ -65,6 +66,7 @@ static struct _fl { { "content_type_is_type", rspamd_content_type_is_type }, { "has_content_part", rspamd_has_content_part }, { "has_content_part_len", rspamd_has_content_part_len }, + { "has_fake_html", rspamd_has_fake_html }, { "has_html_tag", rspamd_has_html_tag }, { "has_only_html_part", rspamd_has_only_html_part }, { "header_exists", rspamd_header_exists }, @@ -1606,6 +1608,28 @@ rspamd_has_html_tag (struct worker_task *task, GList *args) } +gboolean +rspamd_has_fake_html (struct worker_task *task, GList *args) +{ + struct mime_text_part *p; + GList *cur; + gboolean res = FALSE; + + cur = g_list_first (task->text_parts); + + while (cur && res == FALSE) { + p = cur->data; + if (p->is_html && p->html_nodes == NULL) { + res = TRUE; + } + cur = g_list_next (cur); + } + + return res; + +} + + /* * vi:ts=4 */ |