<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3AEscape%2Fdoc</id>
	<title>Template:Escape/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3AEscape%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Escape/doc&amp;action=history"/>
	<updated>2026-04-08T13:57:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Template:Escape/doc&amp;diff=11805&amp;oldid=prev</id>
		<title>Caleb Cooper: Created page with &quot;{{Context}} {{Documentation subpage}} {{Lua|Module:Escape}} &lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Escape/doc&amp;diff=11805&amp;oldid=prev"/>
		<updated>2020-10-16T12:25:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Context}} {{Documentation subpage}} {{Lua|Module:Escape}} &amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Context}}&lt;br /&gt;
{{Documentation subpage}}&lt;br /&gt;
{{Lua|Module:Escape}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
While primarily intended for use by other Lua modules, it can provide an alternative to multiple {{tag|nowiki}} tags when part of the desired output should be executed.&lt;br /&gt;
&lt;br /&gt;
For example, {{t|demo}} normally requires the demonstrated template to be wrapped in {{tag|nowiki}}. However, you may want part of the value to be shown in the &amp;#039;pre&amp;#039; tag to be processed before it reaches {{t|demo}}, such as in the example below where the result of &amp;lt;code&amp;gt;{{escape|mode=kill|char=!|{*{#invoke:Escape/testcases!test_string2}*}|*|{{!}}}}&amp;lt;/code&amp;gt; is shown inside the {{tag|pre}} tags.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;#039;width:30%&amp;#039; class=wikitable&lt;br /&gt;
|-&lt;br /&gt;
!Code&lt;br /&gt;
!Result&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
{{demo&lt;br /&gt;
|&amp;lt;!--not escaped: --&amp;gt;{{escape | mode = kill &lt;br /&gt;
  | char=; &lt;br /&gt;
  | {*{#invoke:Escape ; main ; mode {{=}} kill ;&lt;br /&gt;
&amp;lt;!--unescaped:--&amp;gt;{{#invoke:Escape/testcases|test_string2}}&amp;lt;br&amp;gt;; { }*} &lt;br /&gt;
  | * &lt;br /&gt;
  | {{!}} }}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
{{demo&lt;br /&gt;
|&amp;lt;!--not escaped: --&amp;gt;{{escape | mode = kill &lt;br /&gt;
  | char=; &lt;br /&gt;
  | {*{#invoke:Escape ; main ; mode {{=}} kill ;&lt;br /&gt;
&amp;lt;!--unescaped:--&amp;gt;{{#invoke:Escape/testcases|test_string2}}&amp;lt;br&amp;gt;; { }*} &lt;br /&gt;
  | * &lt;br /&gt;
  | {{!}} }}&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note how the {{code|*}} character, used to break up the {{code|{{((}}}} to prevent execution, is removed and how the {{code|;}} character is replaced by {{code|{{!}}}}.&lt;br /&gt;
&lt;br /&gt;
===Non-execution===&lt;br /&gt;
After removal of the escape chars, the returned text is inert; i.e. not executed even without {{tag|pre}}. (The above example is executed only because {{t|demo}} forces execution.)&lt;br /&gt;
&lt;br /&gt;
For example, setting {{para|mode|kill}} with {{code|\{\{done\}\}}} as the first parameter and nothing else will simply cause the default escape character {{code|\}} to be removed:&lt;br /&gt;
&lt;br /&gt;
{{escape|mode=kill|\{\{done\}\} }}&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{{escape&lt;br /&gt;
|mode=kill&lt;br /&gt;
|char=#invoke:E&lt;br /&gt;
|{{Module talk:Escape/testcases}}&lt;br /&gt;
|main{{!}}&lt;br /&gt;
|e&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Wikipedia_utility_templates]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>