diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-07 16:35:02 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-07 16:35:02 +0100 |
commit | 1016ab74edfded80042be66bd37651672cb12808 (patch) | |
tree | d49c1f17664102a3829f3305c9736674533f78d2 /lualib/rspamadm | |
parent | af46edb50eeba9d035a0c4d0bf32a800955c5ae9 (diff) | |
download | rspamd-1016ab74edfded80042be66bd37651672cb12808.tar.gz rspamd-1016ab74edfded80042be66bd37651672cb12808.zip |
[Minor] Allow to get invisible content in `rspamadm mime ex`
Diffstat (limited to 'lualib/rspamadm')
-rw-r--r-- | lualib/rspamadm/mime.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua index 68dd9e760..0faeeca78 100644 --- a/lualib/rspamadm/mime.lua +++ b/lualib/rspamadm/mime.lua @@ -77,6 +77,8 @@ extract:flag "-p --part" :description "Show part info" extract:flag "-s --structure" :description "Show structure info (e.g. HTML tags)" +extract:flag "-i --invisible" + :description "Show invisible content for HTML parts" extract:option "-F --words-format" :description "Words format ('stem', 'norm', 'raw', 'full')" :argname("<type>") @@ -432,6 +434,11 @@ local function extract_handler(opts) else -- opts.structure table.insert(out_elts[fname], tostring(part:get_content(how))) end + if opts.invisible then + local hc = part:get_html() + table.insert(out_elts[fname], string.format('invisible content: %s', + tostring(hc:get_invisible()))) + end end end |