Module:HtmlBuilder/options
< Module:HtmlBuilder
Jump to navigation
Jump to search
Revision as of 17:37, 7 June 2022 by FnControlOption (talk | contribs) (FnControlOption changed the content model of the page Module:HtmlBuilder/options from "Scribunto" to "plain text")
local options = {
uniqPrefix = '\x7fUNIQ-',
uniqSuffix = '-QINU\x7f',
htmlencodeMap = {
['>'] = '>',
['<'] = '<',
['&'] = '&',
['"'] = '"',
}
}
options.encodedUniqPrefixPat = string.gsub( options.uniqPrefix, '[<>&"]', options.htmlencodeMap );
options.encodedUniqPrefixPat = string.gsub( options.encodedUniqPrefixPat, '%p', '%%%0' );
options.uniqPrefixRepl = string.gsub( options.uniqPrefix, '%%', '%%%0' );
options.encodedUniqSuffixPat = string.gsub( options.uniqSuffix, '[<>&"]', options.htmlencodeMap );
options.encodedUniqSuffixPat = string.gsub( options.encodedUniqSuffixPat, '%p', '%%%0' );
options.uniqSuffixRepl = string.gsub( options.uniqSuffix, '%%', '%%%0' );
return options