commit 27d54da: [Minor] Improve html tags structure display

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jul 29 12:28:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-29 13:02:41 +0100
URL: https://github.com/rspamd/rspamd/commit/27d54da3f6c7801edea15cdf9d00f9956f7f87bf (HEAD -> master)

[Minor] Improve html tags structure display

---
 lualib/rspamadm/mime.lua | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua
index 8bd2478c8..764d4f325 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


More information about the Commits mailing list