From: Vsevolod Stakhov Date: Thu, 29 Jul 2021 12:02:41 +0000 (+0100) Subject: [Minor] Improve html tags structure display X-Git-Tag: 3.0~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27d54da3f6c7801edea15cdf9d00f9956f7f87bf;p=thirdparty%2Frspamd.git [Minor] Improve html tags structure display --- diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua index 8bd2478c8a..764d4f3258 100644 --- a/lualib/rspamadm/mime.lua +++ b/lualib/rspamadm/mime.lua @@ -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