Module:Sandbox/User:The Gaffer/Modules/Infobox Switch: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
The Gaffer (talk | contribs) No edit summary |
The Gaffer (talk | contribs) No edit summary |
||
Line 71: | Line 71: | ||
p.infobox_switch = function(frame) |
p.infobox_switch = function(frame) |
||
local html_output = p._infobox_switch(frame:getParent().args) |
local html_output = p._infobox_switch(frame:getParent().args) |
||
-- Use frame:extensionTag() to wrap the HTML in a div and ensure it is treated as raw HTML |
|||
return mw.text.unstrip(html_output) |
|||
return frame:extensionTag('div', html_output, { contentmodel = 'html' }) |
|||
end |
end |
||