]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Parse <link> HTML tags
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 1 Dec 2016 16:41:32 +0000 (16:41 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 1 Dec 2016 17:16:25 +0000 (17:16 +0000)
src/libserver/html.c
src/lua/lua_html.c

index 94ac6915f89e6ef495376dc17eacc0c4af839998..ce03118b678619839f355548d4ca31fd34c5bdd6 100644 (file)
@@ -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);
index b680dae4ebd9018f49ca933c3457a722431c6785..0fdd61929652d2e3df5156a9c65baeb559723a3a 100644 (file)
@@ -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;