Module:Description2

local util_args = require('Module:ArgsUtil') local util_text = require('Module:TextUtil') local REPLACE = { { find = "%^%*%|", replace = "[" }, { find = "['%[%]]", replace = '' }, { find = "<div.- ", replace = '' }, { find = '<span class="no-desc2".- ', replace = '' }, { find = ' ', replace = ' ' }, }

local p = {} function p.main(frame) -- strips links & markup characters from standard bio sentence or custom text to be saved in metadesc via description2 extension local args = util_args.merge local desc = args[1] if not desc then return end frame:callParserFunction{ name = '#description2', args = util_text.escapeCustom(desc, REPLACE) } end return p