summaryrefslogtreecommitdiffstats
path: root/src/libserver/html.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-17 15:05:49 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-17 15:06:32 +0000
commit7c7b34864cb4c530385c0e7c9e4505b96a44456e (patch)
treea5680e01d98f7cecfb504c6a99232489a947a801 /src/libserver/html.c
parentf775918665f0313bbeb8f53bafd7e8aa1146e011 (diff)
downloadrspamd-7c7b34864cb4c530385c0e7c9e4505b96a44456e.tar.gz
rspamd-7c7b34864cb4c530385c0e7c9e4505b96a44456e.zip
Fix emails parsing.
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r--src/libserver/html.c13
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);
+ }
}
}
}