commit 1016ab7: [Minor] Allow to get invisible content in `rspamadm mime ex`
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Sep 7 15:42:05 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-09-07 16:35:02 +0100
URL: https://github.com/rspamd/rspamd/commit/1016ab74edfded80042be66bd37651672cb12808 (HEAD -> master)
[Minor] Allow to get invisible content in `rspamadm mime ex`
---
lualib/rspamadm/mime.lua | 7 +++++++
1 file changed, 7 insertions(+)
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
More information about the Commits
mailing list