<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_television_episode</id>
	<title>Module:Infobox television episode - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_television_episode"/>
	<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Infobox_television_episode&amp;action=history"/>
	<updated>2026-04-04T17:28:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://the-democratika.com/wiki/index.php?title=Module:Infobox_television_episode&amp;diff=6488&amp;oldid=prev</id>
		<title>&gt;Gonnym: fix</title>
		<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Infobox_television_episode&amp;diff=6488&amp;oldid=prev"/>
		<updated>2024-06-04T16:28:27Z</updated>

		<summary type="html">&lt;p&gt;fix&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--- @module&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local maintenance_categories = {&lt;br /&gt;
	incorrectly_formatted = &amp;quot;[[Category:Pages using infobox television episode with incorrectly formatted values|%s]]&amp;quot;,&lt;br /&gt;
	unlinked_values = &amp;quot;[[Category:Pages using infobox television episode with unlinked values|%s]]&amp;quot;,&lt;br /&gt;
	image_values_without_an_image = &amp;quot;[[Category:Pages using infobox television episode with image-related values without an image]]&amp;quot;,&lt;br /&gt;
	unnecessary_title_parameter = &amp;quot;[[Category:Pages using infobox television episode with unnecessary title parameter]]&amp;quot;,&lt;br /&gt;
	non_matching_title = &amp;quot;[[Category:Pages using infobox television episode with non-matching title]]&amp;quot;,&lt;br /&gt;
	flag_icon = &amp;quot;[[Category:Pages using infobox television with flag icon]]&amp;quot;,&lt;br /&gt;
	dates_incorrectly_formatted = &amp;quot;[[Category:Pages using infobox television episode with nonstandard dates]]&amp;quot;,&lt;br /&gt;
	manual_display_title = &amp;quot;[[Category:Pages using infobox television episode with unnecessary manual displaytitle]]&amp;quot;,&lt;br /&gt;
	list_markup = &amp;quot;[[Category:Pages using infobox television episode with unnecessary list markup]]&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--- Returns the text after removing line breaks (&amp;lt;br&amp;gt; tags) and additional spaces as a result.&lt;br /&gt;
---&lt;br /&gt;
--- @param text string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function get_name_with_br_fixes(text)&lt;br /&gt;
	local title, _ = string.gsub(text, &amp;quot;&amp;lt;br%s?/?&amp;gt;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	title, _ = string.gsub(title, &amp;quot;  &amp;quot;, &amp;quot; &amp;quot;)&lt;br /&gt;
	return title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the page name after replacing quotation marks for single quotes and fixing it to use the&lt;br /&gt;
--- &amp;quot;Space+single&amp;quot; and &amp;quot;Single+space&amp;quot; templates if a leading or trailing apostrophe or quotation mark is used.&lt;br /&gt;
---&lt;br /&gt;
--- Note: per [[MOS:QWQ]] an episode title with quotation marks should be replaced with single quotes.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @param article_title string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function get_page_name_with_apostrophe_quotation_fixes(frame, article_title)&lt;br /&gt;
	local page_name, _ = string.gsub(article_title, &amp;#039;&amp;quot;&amp;#039;, &amp;quot;&amp;#039;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	local left_side_template = frame:expandTemplate{title = &amp;quot;Space+single&amp;quot;}&lt;br /&gt;
	local right_side_template = frame:expandTemplate{title = &amp;quot;Single+space&amp;quot;}&lt;br /&gt;
	page_name, _ = string.gsub(string.gsub(page_name, &amp;quot;^&amp;#039;&amp;quot;, left_side_template), &amp;quot;&amp;#039;$&amp;quot;, right_side_template)&lt;br /&gt;
&lt;br /&gt;
	return page_name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the series link.&lt;br /&gt;
---&lt;br /&gt;
--- @param series string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function get_series_link(series)&lt;br /&gt;
	local delink = require(&amp;quot;Module:Delink&amp;quot;)._delink&lt;br /&gt;
	return delink({series, wikilinks = &amp;quot;target&amp;quot;})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns two strings:&lt;br /&gt;
---- The series name after de-linking it and escaping &amp;quot;-&amp;quot;.&lt;br /&gt;
---- The series name after de-linking it.&lt;br /&gt;
---&lt;br /&gt;
--- @param series string&lt;br /&gt;
--- @return string, string&lt;br /&gt;
local function get_series_name(series)&lt;br /&gt;
	local delink = require(&amp;quot;Module:Delink&amp;quot;)._delink&lt;br /&gt;
	local series_name = delink({series})&lt;br /&gt;
&lt;br /&gt;
	-- Escape the character &amp;quot;-&amp;quot; as it is needed for string.find() to work.&lt;br /&gt;
	local _&lt;br /&gt;
	local series_name_escaped, _ = string.gsub(series_name, &amp;quot;-&amp;quot;, &amp;quot;%%-&amp;quot;)&lt;br /&gt;
	return series_name_escaped, series_name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a table consisting of the episode&amp;#039;s title parts.&lt;br /&gt;
---&lt;br /&gt;
--- The return table&amp;#039;s properties:&lt;br /&gt;
--- - title - The episode&amp;#039;s title.&lt;br /&gt;
--- - disambiguation - the disambiguation text without parentheses.&lt;br /&gt;
---&lt;br /&gt;
--- Note: could potentially be moved to an outside module for other template and module uses.&lt;br /&gt;
---&lt;br /&gt;
--- @param text string&lt;br /&gt;
--- @return table&amp;lt;string, string | nil&amp;gt;&lt;br /&gt;
local function get_title_parts(text)&lt;br /&gt;
	local title, disambiguation = string.match(text, &amp;quot;^(.+) (%b())$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	local titleString = title -- TODO: needed until https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis/issues/63 is resolved.&lt;br /&gt;
	if not title or type(title) ~= &amp;quot;string&amp;quot; then&lt;br /&gt;
		titleString = text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	---@type table&amp;lt;string, string | nil&amp;gt;&lt;br /&gt;
	local title_parts = {title = --[[---@not number | nil]] titleString, disambiguation = nil}&lt;br /&gt;
&lt;br /&gt;
	if not disambiguation or type(disambiguation) ~= &amp;quot;string&amp;quot; then&lt;br /&gt;
		return title_parts&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Remove outside parentheses from names which use parentheses as part of the name such as &amp;quot;episode (Randall and Hopkirk (Deceased))&amp;quot;.&lt;br /&gt;
	disambiguation = string.sub(--[[---@not number | nil]] disambiguation, 2, -2)&lt;br /&gt;
	title_parts.disambiguation = --[[---@not number]] disambiguation&lt;br /&gt;
	return title_parts&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the title used in the {{Lowercase title}} template and an optional maintenance category.&lt;br /&gt;
---&lt;br /&gt;
--- @param page_text string&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @param title_parts table&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function get_lowercase_template_status(page_text, args, title_parts)&lt;br /&gt;
	local lowercase_template =  string.match(page_text, &amp;quot;{{[Ll]owercase title.-}}&amp;quot;)&lt;br /&gt;
	if lowercase_template then&lt;br /&gt;
		local lowercase_title, _ = string.gsub(title_parts.title,&amp;quot;^%u&amp;quot;, string.lower)&lt;br /&gt;
		if args.title then&lt;br /&gt;
			if args.title == lowercase_title then&lt;br /&gt;
				return maintenance_categories.unnecessary_title_parameter&lt;br /&gt;
			else&lt;br /&gt;
				return maintenance_categories.non_matching_title&lt;br /&gt;
			end&lt;br /&gt;
			return &amp;quot;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		return lowercase_title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the title used in the {{Correct title}} template and an optional maintenance category.&lt;br /&gt;
---&lt;br /&gt;
--- @param page_text string&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @param return_category boolean&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function get_correct_title_value(page_text, args, return_category)&lt;br /&gt;
	local correct_title_template_pattern = &amp;quot;{{[Cc]orrect title|title=(.*)|reason=.-}}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	local correct_title = string.match(page_text, correct_title_template_pattern)&lt;br /&gt;
&lt;br /&gt;
	if not correct_title then&lt;br /&gt;
		correct_title_template_pattern = &amp;quot;{{[Cc]orrect title|(.*)|reason=.-}}&amp;quot;&lt;br /&gt;
		correct_title = string.match(page_text, correct_title_template_pattern)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not correct_title and type(correct_title) ~= &amp;quot;string&amp;quot; then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local correct_title_title_parts = get_title_parts(correct_title)&lt;br /&gt;
&lt;br /&gt;
	if not correct_title_title_parts.disambiguation then&lt;br /&gt;
		-- If the correct title value has no disambiguation, check if the title used in the infobox is the same as the title used for the correct title value.&lt;br /&gt;
		if return_category and args.title then&lt;br /&gt;
			if args.title == correct_title_title_parts.title then&lt;br /&gt;
				return maintenance_categories.unnecessary_title_parameter&lt;br /&gt;
			else&lt;br /&gt;
				return maintenance_categories.non_matching_title&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return correct_title_title_parts.title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local series_name_escaped, _ = get_series_name(args.series)&lt;br /&gt;
&lt;br /&gt;
	if series_name_escaped ~= &amp;quot;&amp;quot; and (correct_title_title_parts.disambiguation == series_name_escaped or string.find(correct_title_title_parts.disambiguation, series_name_escaped)) then&lt;br /&gt;
		if return_category and args.title then&lt;br /&gt;
			if args.title == correct_title_title_parts.title then&lt;br /&gt;
				return maintenance_categories.unnecessary_title_parameter&lt;br /&gt;
			else&lt;br /&gt;
				return maintenance_categories.non_matching_title&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return correct_title_title_parts.title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Can&amp;#039;t determine if the text in parentheses is disambiguation or part of the title since |series= isn&amp;#039;t used.&lt;br /&gt;
	if return_category then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return correct_title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the display title text used in either the {{DISPLAYTITLE}} or {{Italic title}} templates.&lt;br /&gt;
---&lt;br /&gt;
--- @param page_text string&lt;br /&gt;
--- @param article_title string&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function get_display_title_text(page_text, article_title)&lt;br /&gt;
	local title_modification = string.match(page_text, &amp;quot;{{DISPLAYTITLE:(.-)}}&amp;quot;)&lt;br /&gt;
	if title_modification and type(title_modification) == &amp;quot;string&amp;quot; then&lt;br /&gt;
		return --[[---@not number | nil]] title_modification&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	title_modification = string.match(page_text, &amp;quot;{{Italic title|string=(.-)}}&amp;quot;)&lt;br /&gt;
	if title_modification and type(title_modification) == &amp;quot;string&amp;quot; then&lt;br /&gt;
		local italic_title_text, _ = string.gsub(article_title, --[[---@not number | nil]] title_modification, &amp;quot;&amp;#039;&amp;#039;&amp;quot; .. title_modification .. &amp;quot;&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
		return italic_title_text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the italic_title value is not &amp;quot;no&amp;quot;.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |italic_title=&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function is_italic_title_valid_value(args)&lt;br /&gt;
	if args.italic_title and args.italic_title ~= &amp;quot;no&amp;quot; then&lt;br /&gt;
		return string.format(maintenance_categories.incorrectly_formatted, &amp;quot;italic_title&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the date is not formatted correctly with a {{Start date}} template.&lt;br /&gt;
--- Allow &amp;quot;Unaired&amp;quot; as a valid value for unaired television episodes.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |airdate=&lt;br /&gt;
--- - |released=&lt;br /&gt;
--- - |airdate_overall=&lt;br /&gt;
---&lt;br /&gt;
--- @param start_date string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function are_dates_formatted_correctly(start_date)&lt;br /&gt;
	if start_date and (string.find(start_date, &amp;quot;film%-date&amp;quot;) or not string.find(start_date, &amp;quot;itvstart&amp;quot;) and start_date ~= &amp;quot;Unaired&amp;quot;) then&lt;br /&gt;
		return maintenance_categories.dates_incorrectly_formatted&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if list markup is used. The infobox can handle list markup correctly.&lt;br /&gt;
---&lt;br /&gt;
--- Note: the code here is temporarily checking only the parameters which have been converted&lt;br /&gt;
--- to use the plainlist class directly. Once current uses will be converted, the function will check all parameters&lt;br /&gt;
--- for incorrect usage.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
---	- Parameters listed below.&lt;br /&gt;
---&lt;br /&gt;
--- Currently checks for the following list markup:&lt;br /&gt;
--- - &amp;lt;br&amp;gt; tags - per [[MOS:NOBR]].&lt;br /&gt;
--- - &amp;lt;li&amp;gt; tags.&lt;br /&gt;
--- - &amp;quot;plainlist&amp;quot; class.&lt;br /&gt;
--- - &amp;quot;hlist&amp;quot; class.&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function uses_list_markup(args)&lt;br /&gt;
	local invalid_tags = {&lt;br /&gt;
		[&amp;quot;br&amp;quot;] = &amp;quot;&amp;lt;[bB][rR]%s?/?&amp;gt;&amp;quot;,&lt;br /&gt;
		[&amp;quot;li&amp;quot;] = &amp;quot;&amp;lt;li&amp;gt;&amp;quot;,&lt;br /&gt;
		[&amp;quot;plainlist&amp;quot;] = &amp;quot;plainlist&amp;quot;,&lt;br /&gt;
		[&amp;quot;hlist&amp;quot;] = &amp;quot;hlist&amp;quot;,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	---@type table&amp;lt;string, boolean&amp;gt;&lt;br /&gt;
	local parameters = {&lt;br /&gt;
		director = true,&lt;br /&gt;
		writer = true,&lt;br /&gt;
		story = true,&lt;br /&gt;
		teleplay = true,&lt;br /&gt;
		narrator = true,&lt;br /&gt;
		presenter = true,&lt;br /&gt;
		producer = true,&lt;br /&gt;
		music = true,&lt;br /&gt;
		photographer = true,&lt;br /&gt;
		editor = true,&lt;br /&gt;
		production = true,&lt;br /&gt;
		airdate = true,&lt;br /&gt;
		guests = true,&lt;br /&gt;
		commentary = true,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	for parameter_name, _ in pairs(parameters) do&lt;br /&gt;
		for _, list_pattern in pairs(invalid_tags) do&lt;br /&gt;
			local parameter_value = args[parameter_name]&lt;br /&gt;
			if parameter_value and string.find(parameter_value, list_pattern) then&lt;br /&gt;
				return maintenance_categories.list_markup&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if a flag icon is used.&lt;br /&gt;
---&lt;br /&gt;
--- All of the infobox values are checked.&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function has_flag_icon(args)&lt;br /&gt;
	for _, value in pairs(args) do&lt;br /&gt;
		if string.find(value, &amp;quot;flagicon&amp;quot;) then&lt;br /&gt;
			return maintenance_categories.flag_icon&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the values are linked.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |episode=&lt;br /&gt;
--- - |season=&lt;br /&gt;
--- - |series_no=&lt;br /&gt;
--- - |episode_list=&lt;br /&gt;
---&lt;br /&gt;
--- The function currently checks if the following values are present:&lt;br /&gt;
--- - ]] - links.&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function are_values_linked(args)&lt;br /&gt;
	local parameters = {&lt;br /&gt;
		episode = args.episode,&lt;br /&gt;
		season = args.season,&lt;br /&gt;
		series_no = args.series_no,&lt;br /&gt;
		episode_list = args.episode_list,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	for key, value in pairs(parameters) do&lt;br /&gt;
		if string.find(value, &amp;quot;]]&amp;quot;, 1, true) then&lt;br /&gt;
			return string.format(maintenance_categories.incorrectly_formatted, key)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the values are formatted.&lt;br /&gt;
---&lt;br /&gt;
--- Most of the infobox values are checked. Not included are:&lt;br /&gt;
--- - |title= - is handled in is_infobox_title_equal_to_article_title()&lt;br /&gt;
--- - |series= - is handled in are_values_links_only()&lt;br /&gt;
--- - |next= - is handled in are_values_links_only()&lt;br /&gt;
--- - |prev= is handled in are_values_links_only()&lt;br /&gt;
--- - |rtitle=&lt;br /&gt;
--- - |rprev=&lt;br /&gt;
--- - |rnext=&lt;br /&gt;
--- - |image_alt=&lt;br /&gt;
--- - |alt=&lt;br /&gt;
--- - |caption=&lt;br /&gt;
--- - |based_on=&lt;br /&gt;
--- - |music=&lt;br /&gt;
--- - |guests=&lt;br /&gt;
--- - |module=&lt;br /&gt;
---&lt;br /&gt;
--- The function currently checks if the following values are present:&lt;br /&gt;
--- - &amp;#039;&amp;#039; - italics or bold.&lt;br /&gt;
---&lt;br /&gt;
--- Note:&lt;br /&gt;
--- If the series is American Horror Story then the season_article value is allowed to be formatted.&lt;br /&gt;
--- If in the future more series need this exception then the hardcoded value in the function should be taken out into a list.&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function are_values_formatted(args)&lt;br /&gt;
	---@type table&amp;lt;string, boolean&amp;gt;&lt;br /&gt;
	local ignore_parameters = {&lt;br /&gt;
		title = true,&lt;br /&gt;
		series = true,&lt;br /&gt;
		prev = true,&lt;br /&gt;
		next = true,&lt;br /&gt;
		rtitle = true,&lt;br /&gt;
		rprev = true,&lt;br /&gt;
		rnext = true,&lt;br /&gt;
		image_alt = true,&lt;br /&gt;
		alt = true,&lt;br /&gt;
		caption = true,&lt;br /&gt;
		based_on = true,&lt;br /&gt;
		music = true,&lt;br /&gt;
		guests = true,&lt;br /&gt;
		module = true,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	for key, value in pairs(args) do&lt;br /&gt;
		if not ignore_parameters[key] and string.find(value, &amp;quot;&amp;#039;&amp;#039;&amp;quot;, 1, true) then&lt;br /&gt;
			if key == &amp;quot;season_article&amp;quot; and args.series == &amp;quot;[[American Horror Story]]&amp;quot; then --TODO: This is hardcoded for now.&lt;br /&gt;
				-- Do nothing.&lt;br /&gt;
			else&lt;br /&gt;
				return string.format(maintenance_categories.incorrectly_formatted, key)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the values use additional overall numbering.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |episode=&lt;br /&gt;
--- - |season=&lt;br /&gt;
--- - |series_no=&lt;br /&gt;
---&lt;br /&gt;
--- The function currently checks if the following values are present:&lt;br /&gt;
--- - overall - unsupported series overall numbering.&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function are_values_using_overall(args)&lt;br /&gt;
	local parameters = {&lt;br /&gt;
		episode = args.episode,&lt;br /&gt;
		season = args.season,&lt;br /&gt;
		series_no = args.series_no,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	for key, value in pairs(parameters) do&lt;br /&gt;
		if string.find(value, &amp;quot;overall&amp;quot;) then&lt;br /&gt;
			return string.format(maintenance_categories.incorrectly_formatted, key)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the values are unlinked and if additional characters are found in the text.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |series=&lt;br /&gt;
--- - |prev=&lt;br /&gt;
--- - |next=&lt;br /&gt;
---&lt;br /&gt;
--- The function currently checks if a value is unlinked or if there is any additional character&lt;br /&gt;
--- before or after the linked text.&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function are_values_links_only(args)&lt;br /&gt;
	local parameters = {&lt;br /&gt;
		series = args.series,&lt;br /&gt;
		prev = args.prev,&lt;br /&gt;
		next = args.next,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	for key, value in pairs(parameters) do&lt;br /&gt;
		-- Check whether the values are linked.&lt;br /&gt;
		if not string.find(value, &amp;quot;%[%[.*%]%]&amp;quot;) then&lt;br /&gt;
			return string.format(maintenance_categories.unlinked_values, key)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Check whether the values have anything before or after link brackets.&lt;br /&gt;
		if string.gsub(value, &amp;quot;(%[%[.*%]%])&amp;quot;, &amp;quot;&amp;quot;) ~= &amp;quot;&amp;quot; then&lt;br /&gt;
			return string.format(maintenance_categories.incorrectly_formatted, key)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the |image= value includes the &amp;quot;File:&amp;quot; or &amp;quot;Image:&amp;quot; prefix.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |image=&lt;br /&gt;
---&lt;br /&gt;
--- @param image string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function is_image_using_incorrect_syntax(image)&lt;br /&gt;
	if not image then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if string.find(image, &amp;quot;[Ff]ile:&amp;quot;) or string.find(image, &amp;quot;[Ii]mage:&amp;quot;) then&lt;br /&gt;
		return string.format(maintenance_categories.incorrectly_formatted, &amp;quot;image&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the |image_size= value includes &amp;quot;px&amp;quot;.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |image_size=&lt;br /&gt;
---&lt;br /&gt;
--- @param image_size string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function is_image_size_using_px(image_size)&lt;br /&gt;
	if image_size and string.find(image_size, &amp;quot;px&amp;quot;) then&lt;br /&gt;
		return string.format(maintenance_categories.incorrectly_formatted, &amp;quot;image_size&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if there is no image file while image auxiliary values are present.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |image=&lt;br /&gt;
--- - |image_size=&lt;br /&gt;
--- - |image_upright=&lt;br /&gt;
--- - |image_alt=&lt;br /&gt;
--- - |alt=&lt;br /&gt;
--- - |caption=&lt;br /&gt;
---&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function are_image_auxiliary_values_used_for_no_image(args)&lt;br /&gt;
	if args.image then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.image_size or args.image_upright or args.image_alt or args.alt or args.caption then&lt;br /&gt;
		return maintenance_categories.image_values_without_an_image&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a maintenance category if the infobox title is equal to the article title.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |title=&lt;br /&gt;
--- - |series=&lt;br /&gt;
--- - |italic_title&lt;br /&gt;
---&lt;br /&gt;
--- The function currently checks if the infobox title is equal to the article title while ignoring styling such as:&lt;br /&gt;
--- - Nowrap spans.&lt;br /&gt;
--- - Line breaks.&lt;br /&gt;
--- - Leading and trailing apostrophe spaces.&lt;br /&gt;
---&lt;br /&gt;
--- A return value can be one of three options:&lt;br /&gt;
--- - The value of maintenance_categories.non_matching_title - when the args.title does not match the article title.&lt;br /&gt;
--- - The value of maintenance_categories.unnecessary_title_parameter - when the args.title matches the article title.&lt;br /&gt;
--- - An empty string - when args.title isn&amp;#039;t used or the args.title uses an allowed modification&lt;br /&gt;
--- (such as a nowrap template) while the rest of the args.title matchs the article title.&lt;br /&gt;
---&lt;br /&gt;
--- Testing parameters:&lt;br /&gt;
--- - |page_test= - a real Wikipedia page to read the content of the page.&lt;br /&gt;
--- - |page_title_test= - the title of the page being checked.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @param args table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function is_infobox_title_equal_to_article_title(frame, args)&lt;br /&gt;
	if not args.title then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local page_text&lt;br /&gt;
	if args.page_test then&lt;br /&gt;
		page_text = mw.title.new(args.page_test):getContent()&lt;br /&gt;
	else&lt;br /&gt;
		page_text = mw.title.getCurrentTitle():getContent()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Check if the article is using a {{Correct title}} template.&lt;br /&gt;
	local correct_title = get_correct_title_value(page_text, args, true)&lt;br /&gt;
	if correct_title then&lt;br /&gt;
		return correct_title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local article_title = args.page_title_test&lt;br /&gt;
	if not args.page_title_test then&lt;br /&gt;
		article_title = mw.title.getCurrentTitle().text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title_parts = get_title_parts(article_title)&lt;br /&gt;
&lt;br /&gt;
	-- Check if the article is using a {{Lowercase title}} template.&lt;br /&gt;
	local lowercase_title = get_lowercase_template_status(page_text, args, title_parts)&lt;br /&gt;
	if lowercase_title then&lt;br /&gt;
		return lowercase_title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if title_parts.disambiguation then&lt;br /&gt;
		local series_name_escaped, _ = get_series_name(args.series)&lt;br /&gt;
		series_name_escaped = get_name_with_br_fixes(series_name_escaped)&lt;br /&gt;
		if series_name_escaped ~= &amp;quot;&amp;quot; and (title_parts.disambiguation == series_name_escaped or string.find(title_parts.disambiguation, series_name_escaped)) then&lt;br /&gt;
			-- Remove disambiguation.&lt;br /&gt;
			article_title = title_parts.title&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.italic_title then&lt;br /&gt;
		-- Check if the article is using a {{DISPLAYTITLE}} or {{Italic title}} template.&lt;br /&gt;
		local title_modification = get_display_title_text(page_text, article_title)&lt;br /&gt;
		if title_modification then&lt;br /&gt;
			if title_modification == args.title then&lt;br /&gt;
				return maintenance_categories.unnecessary_title_parameter&lt;br /&gt;
			else&lt;br /&gt;
				return maintenance_categories.non_matching_title&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local page_name = get_page_name_with_apostrophe_quotation_fixes(frame, article_title)&lt;br /&gt;
&lt;br /&gt;
	-- Remove nowrap span.&lt;br /&gt;
	if string.find(args.title, &amp;quot;nowrap&amp;quot;) then&lt;br /&gt;
		local title = frame:expandTemplate{title = &amp;quot;Strip tags&amp;quot;, args = {args.title}}&lt;br /&gt;
		if title == page_name then&lt;br /&gt;
			return &amp;quot;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		return maintenance_categories.non_matching_title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Remove line breaks and additional spaces as a result.&lt;br /&gt;
	if string.find(args.title, &amp;quot;&amp;lt;br%s?/?&amp;gt;&amp;quot;) then&lt;br /&gt;
		local title = get_name_with_br_fixes(args.title)&lt;br /&gt;
		if title == page_name then&lt;br /&gt;
			return &amp;quot;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		return maintenance_categories.non_matching_title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.title == page_name then&lt;br /&gt;
		return maintenance_categories.unnecessary_title_parameter&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Article and infobox titles do not match.&lt;br /&gt;
	return maintenance_categories.non_matching_title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the relevant maintenance categories based on the {{Infobox television episode}} values validated.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.validate_values(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	---@type string[]&lt;br /&gt;
	local categories = {}&lt;br /&gt;
	table.insert(categories, is_infobox_title_equal_to_article_title(frame, args))&lt;br /&gt;
	table.insert(categories, are_image_auxiliary_values_used_for_no_image(args))&lt;br /&gt;
	table.insert(categories, is_image_using_incorrect_syntax(args.image))&lt;br /&gt;
	table.insert(categories, is_image_size_using_px(args.image_size))&lt;br /&gt;
	table.insert(categories, are_values_links_only(args))&lt;br /&gt;
	table.insert(categories, are_values_using_overall(args))&lt;br /&gt;
	table.insert(categories, are_values_formatted(args))&lt;br /&gt;
	table.insert(categories, are_values_linked(args))&lt;br /&gt;
	table.insert(categories, has_flag_icon(args))&lt;br /&gt;
	table.insert(categories, uses_list_markup(args))&lt;br /&gt;
	table.insert(categories, are_dates_formatted_correctly(args.airdate or args.released))&lt;br /&gt;
	table.insert(categories, is_italic_title_valid_value(args))&lt;br /&gt;
&lt;br /&gt;
	return table.concat(categories)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns an {{Italic dab2}} instance if title qualifies. Also returns a maintenance category if conditions are met.&lt;br /&gt;
---&lt;br /&gt;
--- The article&amp;#039;s title is italicized if the series name is included in the article&amp;#039;s title disambiguation.&lt;br /&gt;
--- No italicization happens if one of the following conditions is met:&lt;br /&gt;
---&lt;br /&gt;
--- - |italic_title= is set to &amp;quot;no&amp;quot;.&lt;br /&gt;
--- - The article&amp;#039;s title does not use disambiguation.&lt;br /&gt;
--- - No |series= value is set.&lt;br /&gt;
--- - The article&amp;#039;s disambiguation is not equal or does not include the series name.&lt;br /&gt;
---&lt;br /&gt;
--- The page is added to a maintenance category if the title is italicized and there is already an&lt;br /&gt;
--- {{Italic dab}}, {{Italic title}} or {{DISPLAYTITLE}} template.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |series=&lt;br /&gt;
--- - |italic_title=&lt;br /&gt;
---&lt;br /&gt;
--- Testing parameters:&lt;br /&gt;
--- - |page_test= - a real Wikipedia page to read the content of the page.&lt;br /&gt;
--- - |page_title_test= - the title of the page being checked.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string, string&lt;br /&gt;
function p.italic_title(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	local page_text&lt;br /&gt;
	if args.page_test then&lt;br /&gt;
		page_text = mw.title.new(args.page_test):getContent()&lt;br /&gt;
	else&lt;br /&gt;
		page_text = mw.title.getCurrentTitle():getContent()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local maintenance_category = &amp;quot;&amp;quot;&lt;br /&gt;
	-- In case the page does not need to be italicized or can&amp;#039;t be automatically done, a &amp;quot;no&amp;quot; value will disable both&lt;br /&gt;
	-- the italicization and the error handling.&lt;br /&gt;
	if args.italic_title == &amp;quot;no&amp;quot; then&lt;br /&gt;
		return &amp;quot;&amp;quot;, maintenance_category&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local article_title = args.page_title_test&lt;br /&gt;
	if not args.page_title_test then&lt;br /&gt;
		article_title = mw.title.getCurrentTitle().text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Check if the page already has an {{Italic dab}}, {{Italic title}} or {{DISPLAYTITLE}} template.&lt;br /&gt;
	local has_italic_dab, _ = string.find(page_text, &amp;quot;{{[Ii]talic dab&amp;quot;)&lt;br /&gt;
	local has_italic_title, _ = string.find(page_text, &amp;quot;{{[Ii]talic title&amp;quot;)&lt;br /&gt;
	local has_display_title, _ = string.find(page_text, &amp;quot;{{DISPLAYTITLE&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	if has_italic_dab or has_italic_title or has_display_title then&lt;br /&gt;
		maintenance_category = maintenance_categories.manual_display_title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title_parts = get_title_parts(article_title)&lt;br /&gt;
&lt;br /&gt;
	-- The title is not italicized if the title does not use disambiguation or if the series parameter isn&amp;#039;t used.&lt;br /&gt;
	if not title_parts.disambiguation or not args.series then&lt;br /&gt;
		return &amp;quot;&amp;quot;, maintenance_category&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local series_name_escaped, series_name = get_series_name(args.series)&lt;br /&gt;
	series_name_escaped = get_name_with_br_fixes(series_name_escaped)&lt;br /&gt;
	series_name = get_name_with_br_fixes(series_name)&lt;br /&gt;
&lt;br /&gt;
	-- Check if the disambiguation equals the series name or if the series name can be found in the disambiguation.&lt;br /&gt;
	local italic_dab&lt;br /&gt;
	if title_parts.disambiguation == series_name then&lt;br /&gt;
		italic_dab = frame:expandTemplate{title = &amp;quot;Italic dab2&amp;quot;}&lt;br /&gt;
	elseif string.find(title_parts.disambiguation, series_name_escaped) then&lt;br /&gt;
		italic_dab = frame:expandTemplate{title = &amp;quot;Italic dab2&amp;quot;, args = {string = series_name}}&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;&amp;quot;, maintenance_category&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.page_title_test and italic_dab then&lt;br /&gt;
		italic_dab = &amp;quot;italic_dab&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return italic_dab, maintenance_category&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a formatted title string.&lt;br /&gt;
---&lt;br /&gt;
--- @param rtitle string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function create_title_with_rtitle_value(rtitle)&lt;br /&gt;
	local title_pattern = &amp;#039;&amp;quot;(.*)&amp;quot; and &amp;quot;(.*)&amp;quot;&amp;#039;&lt;br /&gt;
	if string.find(rtitle, title_pattern) then&lt;br /&gt;
		local episode1, episode2 = string.match(rtitle, title_pattern)&lt;br /&gt;
		local title_format = &amp;quot;\&amp;quot;&amp;#039;&amp;#039;&amp;#039;%s&amp;#039;&amp;#039;&amp;#039;\&amp;quot; and \&amp;quot;&amp;#039;&amp;#039;&amp;#039;%s&amp;#039;&amp;#039;&amp;#039;\&amp;quot;&amp;quot;&lt;br /&gt;
		return string.format(title_format, episode1, episode2)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title_pattern_br = &amp;#039;&amp;quot;(.*)&amp;quot; and%s?&amp;lt;br%s?/?&amp;gt;%s?&amp;quot;(.*)&amp;quot;&amp;#039;&lt;br /&gt;
	if string.find(rtitle, title_pattern_br) then&lt;br /&gt;
		local episode1, episode2 = string.match(rtitle, title_pattern_br)&lt;br /&gt;
		local title_format = &amp;quot;\&amp;quot;&amp;#039;&amp;#039;&amp;#039;%s&amp;#039;&amp;#039;&amp;#039;\&amp;quot; and&amp;lt;br/&amp;gt; \&amp;quot;&amp;#039;&amp;#039;&amp;#039;%s&amp;#039;&amp;#039;&amp;#039;\&amp;quot;&amp;quot;&lt;br /&gt;
		return string.format(title_format, episode1, episode2)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return string.format(&amp;quot;&amp;#039;&amp;#039;&amp;#039;%s&amp;#039;&amp;#039;&amp;#039;&amp;quot;, rtitle)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the text used for the |above= field of the infobox.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |rtitle=&lt;br /&gt;
--- - |title=&lt;br /&gt;
--- - |series=&lt;br /&gt;
---&lt;br /&gt;
--- Testing parameters:&lt;br /&gt;
--- - |page_test= - a real Wikipedia page to read the content of the page.&lt;br /&gt;
--- - |page_title_test= - the title of the page being checked.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string&lt;br /&gt;
local function _above_title(frame, args)&lt;br /&gt;
	if args.rtitle then&lt;br /&gt;
		return create_title_with_rtitle_value(args.rtitle)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local page&lt;br /&gt;
	if args.page_test then&lt;br /&gt;
		page = mw.title.new(args.page_test)&lt;br /&gt;
	else&lt;br /&gt;
		page = mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local page_text = page:getContent()&lt;br /&gt;
&lt;br /&gt;
	local article_title = args.page_title_test&lt;br /&gt;
	if not args.page_title_test then&lt;br /&gt;
		article_title = page.text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title_format = &amp;quot;\&amp;quot;&amp;#039;&amp;#039;&amp;#039;%s&amp;#039;&amp;#039;&amp;#039;\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	local correct_title = get_correct_title_value(page_text, args, false)&lt;br /&gt;
	if correct_title then&lt;br /&gt;
		return string.format(title_format, correct_title)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title_parts = get_title_parts(article_title)&lt;br /&gt;
&lt;br /&gt;
	local lowercase_title = get_lowercase_template_status(page_text, args, title_parts)&lt;br /&gt;
	if lowercase_title then&lt;br /&gt;
		return string.format(title_format, lowercase_title)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local series_name_escaped, _ = get_series_name(args.series)&lt;br /&gt;
&lt;br /&gt;
	-- args.no_bold is used from IMDb episode so it requires this correction here also.&lt;br /&gt;
	if (args.italic_title and not args.rtitle) or args.no_bold then&lt;br /&gt;
		local title_modification = get_display_title_text(page_text, article_title)&lt;br /&gt;
&lt;br /&gt;
		if title_modification then&lt;br /&gt;
			if title_parts.disambiguation == series_name_escaped then&lt;br /&gt;
				local correct_title_title_parts = get_title_parts(title_modification)&lt;br /&gt;
				title_modification = correct_title_title_parts.title&lt;br /&gt;
			end&lt;br /&gt;
			return string.format(title_format, title_modification)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.title then&lt;br /&gt;
		return string.format(title_format, args.title)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not title_parts.disambiguation or (series_name_escaped ~= &amp;quot;&amp;quot; and (title_parts.disambiguation == series_name_escaped or string.find(title_parts.disambiguation, series_name_escaped))) or args.no_bold then&lt;br /&gt;
		return string.format(title_format, get_page_name_with_apostrophe_quotation_fixes(frame, title_parts.title))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return string.format(title_format, get_page_name_with_apostrophe_quotation_fixes(frame, article_title))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the episode title from the article title, with textual fixes if needed.&lt;br /&gt;
---&lt;br /&gt;
--- Used by {{Infobox television episode}} and {{IMDb episode}} to automatically style the title without needing manual input.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.above_title(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local title = _above_title(frame, args)&lt;br /&gt;
	&lt;br /&gt;
	-- The title used by {{IMDb episode}} should not be in bold.&lt;br /&gt;
	if args.no_bold then&lt;br /&gt;
		title = string.gsub(title, &amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	return title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a list of episodes link if not formatted, otherwise returns the text used for args.episode_list.&lt;br /&gt;
---&lt;br /&gt;
--- Infobox parameters checked:&lt;br /&gt;
--- - |episode_list=&lt;br /&gt;
--- - |series=&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.episode_list(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	---@type table&amp;lt;string, string&amp;gt;&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	if args.episode_list then&lt;br /&gt;
		for _, v in pairs({&amp;quot;]]&amp;quot;, &amp;quot;&amp;#039;&amp;#039;&amp;quot;}) do&lt;br /&gt;
			if string.find(args.episode_list, v) then&lt;br /&gt;
				return args.episode_list&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if string.find(args.episode_list, &amp;quot;[Ss]toryline&amp;quot;) then&lt;br /&gt;
			return &amp;quot;[[&amp;quot; .. args.episode_list .. &amp;quot;|Storylines]]&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		return &amp;quot;[[&amp;quot; .. args.episode_list .. &amp;quot;|List of episodes]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.series then&lt;br /&gt;
		local series_name = get_series_link(args.series)&lt;br /&gt;
		local list_of_episodes = &amp;quot;List of &amp;quot; .. series_name .. &amp;quot; episodes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
		if mw.title.new(list_of_episodes):getContent() then&lt;br /&gt;
			return &amp;quot;[[&amp;quot; .. list_of_episodes .. &amp;quot;|List of episodes]]&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the relevant maintenance categories based on the {{Infobox television crossover episode}} values validated.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.validate_values_crossover(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	---@type string[]&lt;br /&gt;
	local categories = {}&lt;br /&gt;
	table.insert(categories, are_image_auxiliary_values_used_for_no_image(args))&lt;br /&gt;
	table.insert(categories, is_image_using_incorrect_syntax(args.image))&lt;br /&gt;
	table.insert(categories, is_image_size_using_px(args.image_size))&lt;br /&gt;
	table.insert(categories, has_flag_icon(args))&lt;br /&gt;
	table.insert(categories, are_dates_formatted_correctly(args.airdate_overall))&lt;br /&gt;
&lt;br /&gt;
	for i = 1, 5 do&lt;br /&gt;
		if not args[&amp;quot;series&amp;quot; .. i] then&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local nested_args = {&lt;br /&gt;
			series = args[&amp;quot;series&amp;quot; .. i],&lt;br /&gt;
			episode = args[&amp;quot;episode_no&amp;quot; .. i],&lt;br /&gt;
			season = args[&amp;quot;season&amp;quot; .. i],&lt;br /&gt;
			airdate = args[&amp;quot;airdate&amp;quot; .. i],&lt;br /&gt;
			prev = args[&amp;quot;prev&amp;quot; .. i],&lt;br /&gt;
			next = args[&amp;quot;next&amp;quot; .. i],&lt;br /&gt;
			episode_list = args[&amp;quot;episode_list&amp;quot; .. i],&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		table.insert(categories, are_values_links_only(nested_args))&lt;br /&gt;
		table.insert(categories, are_values_using_overall(nested_args))&lt;br /&gt;
		table.insert(categories, are_values_formatted(nested_args))&lt;br /&gt;
		table.insert(categories, are_values_linked(nested_args))&lt;br /&gt;
		table.insert(categories, are_dates_formatted_correctly(nested_args.airdate))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(categories, &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>&gt;Gonnym</name></author>
	</entry>
</feed>