]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Improve html tags structure display
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 29 Jul 2021 12:02:41 +0000 (13:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 29 Jul 2021 12:02:41 +0000 (13:02 +0100)
lualib/rspamadm/mime.lua

index 8bd2478c8a44a8a2ff2b9d4d674ee9c934347c7c..764d4f3258094b14569b5664d7fbbd333e5ffbce 100644 (file)
@@ -385,8 +385,8 @@ local function extract_handler(opts)
             if opts.structure then
               local hc = part:get_html()
               local res = {}
-              process_func = function(k, v)
-                return rspamd_logger.slog("%s = %s", k, v)
+              process_func = function(elt)
+                return rspamd_logger.slog("%s", elt)
               end
 
               hc:foreach_tag('any', function(tag)
@@ -400,6 +400,10 @@ local function extract_handler(opts)
                 if content then
                   elt.content = tostring(content)
                 end
+                local style = tag:get_style()
+                if style then
+                  elt.style = style
+                end
                 table.insert(res, elt)
               end)
               out_elts[fname] = res