<?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%3ABad_title_suggestion%2Fsandbox</id>
	<title>Module:Bad title suggestion/sandbox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ABad_title_suggestion%2Fsandbox"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Bad_title_suggestion/sandbox&amp;action=history"/>
	<updated>2026-04-21T06:20:13Z</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:Bad_title_suggestion/sandbox&amp;diff=135356&amp;oldid=prev</id>
		<title>imported&gt;54nd60x: ←Created page with &#039;--[[    local getArgs = require(&quot;Module:Arguments&quot;).getArgs local p = {}  function p.main(frame) 	local args = getArgs(frame) 	-- The invalid character, e.g. &quot;&gt;&quot;...&#039;</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Bad_title_suggestion/sandbox&amp;diff=135356&amp;oldid=prev"/>
		<updated>2021-04-15T13:13:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=WP:AES&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:AES (page does not exist)&quot;&gt;←&lt;/a&gt;Created page with &amp;#039;--[[    local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs local p = {}  function p.main(frame) 	local args = getArgs(frame) 	-- The invalid character, e.g. &amp;quot;&amp;gt;&amp;quot;...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
   local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	-- The invalid character, e.g. &amp;quot;&amp;gt;&amp;quot; or &amp;quot;}&amp;quot;&lt;br /&gt;
	local chr = args[1]&lt;br /&gt;
	-- The escaped bad title, e.g. &amp;quot;Foobar&amp;amp;#62;&amp;quot; or &amp;quot;Foobar&amp;amp;#124;text&amp;quot;&lt;br /&gt;
	local title = args[2]&lt;br /&gt;
	-- A pipe (|) as the invalid character is a special case; it is not&lt;br /&gt;
	-- escaped, so instead the module thinks it got two empty arguments&lt;br /&gt;
	-- and the title as the third argument.&lt;br /&gt;
	if chr == nil and title == nil then&lt;br /&gt;
		chr = &amp;quot;|&amp;quot;&lt;br /&gt;
		title = args[3]&lt;br /&gt;
	end&lt;br /&gt;
	if chr == nil or title == nil then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Determine the suggested title by taking a prefix of the bad title&lt;br /&gt;
	-- up to the first invalid character. Only display the suggestion box&lt;br /&gt;
	-- if the page exists.&lt;br /&gt;
	local index = mw.ustring.find(title, mw.text.nowiki(chr), 1, true)&lt;br /&gt;
	if index == nil then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local page = mw.title.new(mw.ustring.sub(title, 1, index - 1))&lt;br /&gt;
	if page == nil or not page.exists then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return frame:expandTemplate{&lt;br /&gt;
		title = &amp;quot;Did you mean box&amp;quot;,&lt;br /&gt;
		args = { page.fullText }&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&lt;br /&gt;
--]]&lt;/div&gt;</summary>
		<author><name>imported&gt;54nd60x</name></author>
	</entry>
</feed>