aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-09 12:07:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-09 12:07:46 +0100
commitf1a4121eca2230cfe364808a92e3b4d909a183b4 (patch)
treeb62761250815f2b5a6da588911327031d98d1445 /src/libserver
parent47e260127847f720b64535205251ea39f86ab514 (diff)
downloadrspamd-f1a4121eca2230cfe364808a92e3b4d909a183b4.tar.gz
rspamd-f1a4121eca2230cfe364808a92e3b4d909a183b4.zip
[Feature] Store url object in images
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/html.c4
-rw-r--r--src/libserver/html.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c
index 9e73b6f3e..ff745f80d 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -1512,6 +1512,10 @@ rspamd_html_process_img_tag (rspamd_mempool_t *pool, struct html_tag *tag,
}
else {
img->flags |= RSPAMD_HTML_FLAG_IMAGE_EXTERNAL;
+ if (img->src) {
+ img->url = rspamd_html_process_url (pool,
+ img->src, fstr.len, NULL);
+ }
}
}
else if (comp->type == RSPAMD_HTML_COMPONENT_HEIGHT) {
diff --git a/src/libserver/html.h b/src/libserver/html.h
index c7534d309..c5a989f0e 100644
--- a/src/libserver/html.h
+++ b/src/libserver/html.h
@@ -48,6 +48,7 @@ struct html_image {
guint width;
guint flags;
gchar *src;
+ struct rspamd_url *url;
struct html_tag *tag;
};