Difference between revisions of "Module:HtmlBuilder/options"
Jump to navigation
Jump to search
(FnControlOption changed the content model of the page Module:HtmlBuilder/options from "Scribunto" to "plain text") Tag: content model change |
(FnControlOption changed the content model of the page Module:HtmlBuilder/options from "plain text" to "Scribunto") Tag: content model change |
(No difference)
|
Latest revision as of 17:37, 7 June 2022
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