<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AEscape</id>
	<title>Module:Escape - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AEscape"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Escape&amp;action=history"/>
	<updated>2026-04-16T22:34:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Escape&amp;diff=136087&amp;oldid=prev</id>
		<title>imported&gt;MusikBot II: Changed protection settings for &quot;Module:Escape&quot;: High-risk template or module 8904 transclusions (more info) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Escape&amp;diff=136087&amp;oldid=prev"/>
		<updated>2021-08-17T01:23:46Z</updated>

		<summary type="html">&lt;p&gt;Changed protection settings for &amp;quot;&lt;a href=&quot;/research/Module:Escape&quot; title=&quot;Module:Escape&quot;&gt;Module:Escape&lt;/a&gt;&amp;quot;: &lt;a href=&quot;https://en.wikipedia.org/wiki/High-risk_templates&quot; class=&quot;extiw&quot; title=&quot;wikipedia:High-risk templates&quot;&gt;High-risk template or module&lt;/a&gt; 8904 transclusions (&lt;a href=&quot;/index.php?title=User:MusikBot_II/TemplateProtector&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:MusikBot II/TemplateProtector (page does not exist)&quot;&gt;more info&lt;/a&gt;) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local escape = {&lt;br /&gt;
	char = function(self, chr, args)&lt;br /&gt;
		args = args or {}&lt;br /&gt;
		local safe = args.safeChr or string.char(13)&lt;br /&gt;
		chr = tostring(chr or &amp;#039;\\&amp;#039;)&lt;br /&gt;
		self[1] = (&amp;#039;%s0%%s%s&amp;#039;):format(&lt;br /&gt;
			(&amp;#039;%x%s%s&amp;#039;):format(chr:byte(), safe, safe),&lt;br /&gt;
			(&amp;#039;%s%x&amp;#039;):format(safe, chr:byte())&lt;br /&gt;
		)&lt;br /&gt;
		if not self[self[1]] then&lt;br /&gt;
			self[self[1]] = {&lt;br /&gt;
				char = chr,&lt;br /&gt;
				text = (&amp;#039;%s(.)&amp;#039;):format(chr),&lt;br /&gt;
				undo = self[1]:format&amp;#039;(%d+)&amp;#039;&lt;br /&gt;
			}&lt;br /&gt;
		end&lt;br /&gt;
		return args.text and self:text(args.text)&lt;br /&gt;
			or args.undo and self:undo(args.undo, chr)&lt;br /&gt;
			or args.kill and self:kill(args.kill)&lt;br /&gt;
			or self&lt;br /&gt;
	end,&lt;br /&gt;
	exec = function(self, text, mode, newEscape)&lt;br /&gt;
		local target = self[self[1] or self:char() and self[1]]&lt;br /&gt;
		for v in text:gfind(target[mode]) do&lt;br /&gt;
			text = text:gsub(&lt;br /&gt;
				mode == &amp;#039;text&amp;#039; and&lt;br /&gt;
					(&amp;#039;%s%s&amp;#039;):format(target.char, v:gsub(&amp;#039;%W&amp;#039;, &amp;#039;%%%1&amp;#039;))&lt;br /&gt;
					or self[1]:format(v),&lt;br /&gt;
				mode == &amp;#039;text&amp;#039; and&lt;br /&gt;
					self[1]:format(v:byte())&lt;br /&gt;
					or (newEscape or &amp;#039;&amp;#039;) .. v:char()&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
		return text&lt;br /&gt;
	end,&lt;br /&gt;
	text = function(self, text)&lt;br /&gt;
		return self:exec(type(text) == &amp;#039;table&amp;#039; and text[1] or text, &amp;#039;text&amp;#039;)&lt;br /&gt;
	end,&lt;br /&gt;
	undo = function(self, text, newEscape)&lt;br /&gt;
		if type(text) == &amp;#039;table&amp;#039; then&lt;br /&gt;
			text, newEscape = unpack(text)&lt;br /&gt;
		end&lt;br /&gt;
		return self:exec(text, &amp;#039;undo&amp;#039;, newEscape)&lt;br /&gt;
	end,&lt;br /&gt;
	kill = function(self, text, chars, newEscape)&lt;br /&gt;
		if type(text) == &amp;#039;table&amp;#039; then&lt;br /&gt;
			text, chars, newEscape = unpack(text)&lt;br /&gt;
		end&lt;br /&gt;
		return self:undo(self:text(text):gsub(chars or &amp;#039;&amp;#039;, &amp;#039;&amp;#039;), newEscape)&lt;br /&gt;
	end&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function escape.main(frame)&lt;br /&gt;
	local args, family = {}, {frame:getParent(), frame}&lt;br /&gt;
	for f = 1, 2 do&lt;br /&gt;
		for k, v in pairs(family[f] and family[f].args or {}) do&lt;br /&gt;
			args[k] = args[k] or v:match(&amp;#039;^%s*(.-)%s*$&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if args.mode == &amp;#039;char&amp;#039; then&lt;br /&gt;
		return escape:char(args.char or args[2], args)&lt;br /&gt;
	end&lt;br /&gt;
	return escape[args.mode](escape:char(args.char), args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return escape&lt;/div&gt;</summary>
		<author><name>imported&gt;MusikBot II</name></author>
	</entry>
</feed>