<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://aew.freosanstudios.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AStripWikitext</id>
	<title>Module:StripWikitext - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aew.freosanstudios.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AStripWikitext"/>
	<link rel="alternate" type="text/html" href="https://aew.freosanstudios.com/w/index.php?title=Module:StripWikitext&amp;action=history"/>
	<updated>2026-06-04T15:01:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://aew.freosanstudios.com/w/index.php?title=Module:StripWikitext&amp;diff=3244&amp;oldid=prev</id>
		<title>TheDragonFire123: Created page with &quot;-- Removes wikilink characters to make them safe for insertion into a category or alt text. local p = {}  function p.strip_wikitext( frame )     toStrip = frame.args[1]...&quot;</title>
		<link rel="alternate" type="text/html" href="https://aew.freosanstudios.com/w/index.php?title=Module:StripWikitext&amp;diff=3244&amp;oldid=prev"/>
		<updated>2022-03-27T01:21:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- Removes wikilink characters to make them safe for insertion into a category or alt text. local p = {}  function p.strip_wikitext( frame )     toStrip = frame.args[1]...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Removes wikilink characters to make them safe for insertion into a category or alt text.&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.strip_wikitext( frame )&lt;br /&gt;
    toStrip = frame.args[1]&lt;br /&gt;
        preferTargetInPipedWikilink = frame.args[2] or true&lt;br /&gt;
    &lt;br /&gt;
    -- If string contains a &amp;quot;|&amp;quot;, then handle according to whether preferDisplayName is enabled&lt;br /&gt;
    if string.match(toStrip, &amp;quot;|&amp;quot;) then&lt;br /&gt;
    	local stringExploder = require(&amp;quot;Module:ExplodeString&amp;quot;)&lt;br /&gt;
    	wikitextPieces = stringExploder.explode_string(toStrip, &amp;quot;|&amp;quot;)&lt;br /&gt;
    	if preferTargetInPipedWikilink then&lt;br /&gt;
    		toStrip = wikitextPieces[1]&lt;br /&gt;
    	else&lt;br /&gt;
    		toStrip = wikitextPieces[2]&lt;br /&gt;
    	end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    toStrip = string.gsub(toStrip, &amp;quot;%[%[&amp;quot;, &amp;quot;&amp;quot;) -- Remove leading square brackets&lt;br /&gt;
    toStrip = string.gsub(toStrip, &amp;quot;%]%]&amp;quot;, &amp;quot;&amp;quot;) -- Remove trailing square brackets&lt;br /&gt;
    &lt;br /&gt;
    return toStrip 		&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>TheDragonFire123</name></author>
	</entry>
</feed>