Module:HtmlBuilder/options
From Minetest
Documentation for this module may be created at Module:HtmlBuilder/options/doc
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