diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-17 15:05:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-17 15:06:32 +0000 |
commit | 7c7b34864cb4c530385c0e7c9e4505b96a44456e (patch) | |
tree | a5680e01d98f7cecfb504c6a99232489a947a801 /src/libserver/html.c | |
parent | f775918665f0313bbeb8f53bafd7e8aa1146e011 (diff) | |
download | rspamd-7c7b34864cb4c530385c0e7c9e4505b96a44456e.tar.gz rspamd-7c7b34864cb4c530385c0e7c9e4505b96a44456e.zip |
Fix emails parsing.
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r-- | src/libserver/html.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index fe90b7dc4..f0d200e88 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -890,8 +890,17 @@ parse_tag_url (struct rspamd_task *task, p++; check_phishing (task, url, p, remain - (p - tag_text), id); } - if (g_tree_lookup (task->urls, url) == NULL) { - g_tree_insert (task->urls, url, url); + if (url->protocol == PROTOCOL_MAILTO) { + if (url->userlen > 0) { + if (!g_tree_lookup (task->emails, url)) { + g_tree_insert (task->emails, url, url); + } + } + } + else { + if (!g_tree_lookup (task->urls, url)) { + g_tree_insert (task->urls, url, url); + } } } } |