<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cern.ch/index.php?action=history&amp;feed=atom&amp;title=Module%3APlain_text</id>
	<title>Module:Plain text - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cern.ch/index.php?action=history&amp;feed=atom&amp;title=Module%3APlain_text"/>
	<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Plain_text&amp;action=history"/>
	<updated>2026-04-03T21:28:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.cern.ch/index.php?title=Module:Plain_text&amp;diff=11394&amp;oldid=prev</id>
		<title>Vigen: 1 revision imported from :wikipedia:Module:Plain_text</title>
		<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Plain_text&amp;diff=11394&amp;oldid=prev"/>
		<updated>2026-04-02T15:21:30Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported from &lt;a href=&quot;https://en.wikipedia.org/wiki/Module:Plain_text&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Module:Plain text&quot;&gt;wikipedia:Module:Plain_text&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:21, 2 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Vigen</name></author>
	</entry>
	<entry>
		<id>https://wiki.cern.ch/index.php?title=Module:Plain_text&amp;diff=11393&amp;oldid=prev</id>
		<title>wikipedia&gt;Dpleibovitz: Fixed the stripping of + signs</title>
		<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Plain_text&amp;diff=11393&amp;oldid=prev"/>
		<updated>2024-12-24T01:02:36Z</updated>

		<summary type="html">&lt;p&gt;Fixed the stripping of + signs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--converts text with wikilinks to plain text, e.g &amp;quot;[[foo|gah]] is [[bar]]&amp;quot; to &amp;quot;gah is bar&amp;quot;&lt;br /&gt;
--removes anything enclosed in tags that isn&amp;#039;t nested, mediawiki strip markers (references etc), files, italic and bold markup&lt;br /&gt;
require[[strict]]&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local text = frame.args[1]&lt;br /&gt;
	local encode = require(&amp;#039;Module:yesno&amp;#039;)(frame.args.encode)&lt;br /&gt;
	return p._main(text, encode)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(text, encode)&lt;br /&gt;
	if not text then return end&lt;br /&gt;
	text = mw.text.killMarkers(text)&lt;br /&gt;
		:gsub(&amp;#039;&amp;amp;nbsp;&amp;#039;, &amp;#039; &amp;#039;) --replace nbsp spaces with regular spaces&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;br ?/?&amp;gt;&amp;#039;, &amp;#039;, &amp;#039;) --replace br with commas&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;span.-&amp;gt;(.-)&amp;lt;/span&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove spans while keeping text inside&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;i.-&amp;gt;(.-)&amp;lt;/i&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove italics while keeping text inside&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;b.-&amp;gt;(.-)&amp;lt;/b&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove bold while keeping text inside&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;em.-&amp;gt;(.-)&amp;lt;/em&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove emphasis while keeping text inside&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;strong.-&amp;gt;(.-)&amp;lt;/strong&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove strong while keeping text inside&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;sub.-&amp;gt;(.-)&amp;lt;/sub&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove subscript markup; retain contents&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;sup.-&amp;gt;(.-)&amp;lt;/sup&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove superscript markup; retain contents&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;u.-&amp;gt;(.-)&amp;lt;/u&amp;gt;&amp;#039;, &amp;#039;%1&amp;#039;) --remove underline markup; retain contents&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;.-&amp;gt;.-&amp;lt;.-&amp;gt;&amp;#039;, &amp;#039;&amp;#039;) --strip out remaining tags and the text inside&lt;br /&gt;
		:gsub(&amp;#039;&amp;lt;.-&amp;gt;&amp;#039;, &amp;#039;&amp;#039;) --remove any other tag markup&lt;br /&gt;
		:gsub(&amp;#039;%[%[%s*[Ff][Ii][Ll][Ee]%s*:.-%]%]&amp;#039;, &amp;#039;&amp;#039;) --strip out files&lt;br /&gt;
		:gsub(&amp;#039;%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:.-%]%]&amp;#039;, &amp;#039;&amp;#039;) --strip out use of image:&lt;br /&gt;
		:gsub(&amp;#039;%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:.-%]%]&amp;#039;, &amp;#039;&amp;#039;) --strip out categories&lt;br /&gt;
		:gsub(&amp;#039;%[%[[^%]]-|&amp;#039;, &amp;#039;&amp;#039;) --strip out piped link text&lt;br /&gt;
		:gsub(&amp;#039;([^%[])%[[^%[%]][^%]]-%s&amp;#039;, &amp;#039;%1&amp;#039;) --strip out external link text&lt;br /&gt;
		:gsub(&amp;#039;^%[[^%[%]][^%]]-%s&amp;#039;, &amp;#039;&amp;#039;) --strip out external link text&lt;br /&gt;
		:gsub(&amp;#039;[%[%]]&amp;#039;, &amp;#039;&amp;#039;) --then strip out remaining [ and ]&lt;br /&gt;
		:gsub(&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;quot;, &amp;quot;&amp;quot;) --strip out bold italic markup&lt;br /&gt;
		:gsub(&amp;quot;&amp;#039;&amp;#039;&amp;#039;?&amp;quot;, &amp;quot;&amp;quot;) --not stripping out &amp;#039;&amp;#039;&amp;#039;&amp;#039; gives correct output for bolded text in quotes&lt;br /&gt;
		:gsub(&amp;#039;%-%-%-%-+&amp;#039;, &amp;#039;&amp;#039;) --remove ---- lines&lt;br /&gt;
		:gsub(&amp;quot;^%s+&amp;quot;, &amp;quot;&amp;quot;) --strip leading&lt;br /&gt;
		:gsub(&amp;quot;%s+$&amp;quot;, &amp;quot;&amp;quot;) --and trailing spaces&lt;br /&gt;
		:gsub(&amp;quot;%s+&amp;quot;, &amp;quot; &amp;quot;) --strip redundant spaces&lt;br /&gt;
	if encode then&lt;br /&gt;
		return mw.text.encode(text)&lt;br /&gt;
	else&lt;br /&gt;
		return text&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Dpleibovitz</name></author>
	</entry>
</feed>