<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://elite.mistflux.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ACall_wikitext</id>
	<title>Module:Call wikitext - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://elite.mistflux.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ACall_wikitext"/>
	<link rel="alternate" type="text/html" href="https://elite.mistflux.co.uk/w/index.php?title=Module:Call_wikitext&amp;action=history"/>
	<updated>2026-11-01T12:14:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://elite.mistflux.co.uk/w/index.php?title=Module:Call_wikitext&amp;diff=111483&amp;oldid=prev</id>
		<title>Wikipedia&gt;Bb010g: Support optional argument unstripSourceCode</title>
		<link rel="alternate" type="text/html" href="https://elite.mistflux.co.uk/w/index.php?title=Module:Call_wikitext&amp;diff=111483&amp;oldid=prev"/>
		<updated>2026-02-24T10:54:34Z</updated>

		<summary type="html">&lt;p&gt;Support optional argument unstripSourceCode&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local parent = frame:getParent()&lt;br /&gt;
	if parent and parent:getTitle():gsub(&amp;#039;/sandbox$&amp;#039;, &amp;#039;&amp;#039;) == &amp;#039;Template:Call wikitext&amp;#039; then&lt;br /&gt;
		-- Treat the &amp;quot;Template:Call wikitext&amp;quot; frame as the current frame&lt;br /&gt;
		frame = parent&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local code = frame.args[&amp;#039;sourceCode&amp;#039;] or error(&amp;quot;sourceCode arg not provided&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	if frame.args[&amp;#039;unstripSourceCode&amp;#039;] == nil or require(&amp;#039;Module:Yesno&amp;#039;)(frame.args[&amp;#039;unstripSourceCode&amp;#039;]) then&lt;br /&gt;
		code = mw.text.unstripNoWiki(code) -- Undo nowiki sanitization&lt;br /&gt;
		code = code:gsub(&amp;quot;&amp;amp;lt;&amp;quot;, &amp;quot;&amp;lt;&amp;quot;):gsub(&amp;quot;&amp;amp;gt;&amp;quot;, &amp;quot;&amp;gt;&amp;quot;) -- Unsanitize &amp;lt; and &amp;gt;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Remove sourceCode and unstripSourceCode from the arguments&lt;br /&gt;
	local newArgs = {}&lt;br /&gt;
	for k, v in pairs(frame.args) do&lt;br /&gt;
		if k ~= &amp;#039;sourceCode&amp;#039; and k ~= &amp;#039;unstripSourceCode&amp;#039; then&lt;br /&gt;
			newArgs[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Create a new frame without &amp;quot;sourceCode&amp;quot; and &amp;quot;unstripSourceCode&amp;quot;&lt;br /&gt;
	local newFrame = frame:newChild{&lt;br /&gt;
		title = &amp;quot;Called wikitext&amp;quot;,&lt;br /&gt;
		args = newArgs&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    return newFrame:preprocess(code)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Bb010g</name></author>
	</entry>
</feed>