Fire Emblem Heroes Wiki
Fire Emblem Heroes Wiki
Documentation for this module may be created at Module:StripWikitext/doc
local p = {}

p.main1 = function (str)
	local stripped = mw.ustring.gsub( str == nil and '' or tostring(str), "<br%s*/?>", " " )
	stripped = mw.ustring.gsub( stripped, "%[%[File:([^%]]-)%]%]", "" )
	stripped = mw.ustring.gsub( stripped, "%[%[([^|]-)%]%]", "%1" )
	stripped = mw.ustring.gsub( stripped, "%[%[([^|]-)|([^%]]-)%]%]", "%2" )
	stripped = mw.ustring.gsub( stripped, ">", "&gt;" )
	stripped = mw.ustring.gsub( stripped, "<", "&lt;" )
	stripped = mw.ustring.gsub( stripped, "\"", "&#34;" )
	stripped = mw.ustring.gsub( stripped, "'''(.-)'''", "%1" )
	stripped = mw.ustring.gsub( stripped, "''(.-)''", "%1" )
	return stripped
end

p._main = function (args)
	return p.main1(args[1])
end

p.main = function (frame)
	return p.main1(frame.args[1])
end

return p