Reported on IRC by KataiKou
on the MW page:
{{#invoke:mymodule|showpage|{{#tag:categorytree|TestCategory|hideroot="true"|namespaces="-"}} }}
And mymodule contents
local p = {} function html_escape(s) assert("Expected string in argument #1.") return (string.gsub(s, "[}{\">/<'&]", { ["&"] = "&", ["<"] = "<", [">"] = ">", ['"'] = """, ["'"] = "'", ["/"] = "/" })) end function p.showpage(frame) local result = '' for name, value in pairs(frame.args) do result = result .. ' ' .. name .. '=' .. html_escape(value) .. '\n' end return result end return p