From: Vsevolod Stakhov Date: Thu, 1 Dec 2016 16:41:32 +0000 (+0000) Subject: [Feature] Parse HTML tags X-Git-Tag: 1.4.2~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6750b4c303c84ff82fa578ad8d49f8f84e5bcf0d;p=rspamd.git [Feature] Parse HTML tags --- diff --git a/src/libserver/html.c b/src/libserver/html.c index 94ac6915f..ce03118b6 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -2115,6 +2115,9 @@ rspamd_html_process_part_full (rspamd_mempool_t *pool, struct html_content *hc, url = NULL; } } + else if (cur_tag->id == Tag_LINK) { + url = rspamd_html_process_url_tag (pool, cur_tag); + } if (cur_tag->id == Tag_IMG && !(cur_tag->flags & FL_CLOSING)) { rspamd_html_process_img_tag (pool, cur_tag, hc); diff --git a/src/lua/lua_html.c b/src/lua/lua_html.c index b680dae4e..0fdd61929 100644 --- a/src/lua/lua_html.c +++ b/src/lua/lua_html.c @@ -638,7 +638,7 @@ lua_html_tag_get_extra (lua_State *L) if (tag) { if (tag->extra) { - if (tag->id == Tag_A || tag->id == Tag_IFRAME) { + if (tag->id == Tag_A || tag->id == Tag_IFRAME || tag->id == Tag_LINK) { /* For A that's URL */ purl = lua_newuserdata (L, sizeof (gpointer)); *purl = tag->extra;