Template talk:Cleanup HTML

Example of how to cleanup bulleted lists
. -- Magioladitis (talk) 09:18, 8 January 2011 (UTC)

Fixed display bug
Dropping a note here for the record. Just fixed a bug [//en.wikipedia.org/w/index.php?title=Template:Cleanup-HTML&diff=prev&oldid=595248095] [//en.wikipedia.org/w/index.php?title=Template:Cleanup-HTML&diff=prev&oldid=595478885] when using this template within Multiple issues.

Formerly, it would display on three lines, each with a bullet point. [//en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=595244268 Here's a snapshot] of what I'm talking about: the first box is substituted and shows the issue. meteor_sandwich_yum (talk) 18:38, 14 February 2014 (UTC)

Do I delete the template when I fix the issue?
I've spent about 20 minutes hunting for an answer but can't seem to find it. I cleaned up the HTML in an article that was tagged. Do I need to delete the template or will that happen automatically with a bot? Popular Outcast talk2me 23:06, 25 September 2018 (UTC)
 * Yes, you can delete the tag. I have some scripts that detect articles with unwanted HTML, so if you missed something the tag will get re-added. But as far as I know there is no one looking for articles that are already fixed and need to have the tag removed. (As of January 2019, there were actually no tagged articles, presumably because the tagged ones had been fixed.) -- Beland (talk) 17:39, 28 February 2019 (UTC)

Is this template desirable?
I cannot see a list of non-deprecated HTML tags in Help:Wikitext examples, so this template exhorts me to adhere to rules which I cannot find.

More generally, is it worth imposing a minor stylistic comment on the attention of readers consulting an encyclopedia? If anyone feels that an article is written in a bad markup style, they can always say so in the talk page. Colin.champion (talk) 12:39, 27 February 2019 (UTC)


 * Hmm, good point. I just updated the instructions to point to another page that I think has a clearer list. It seems like actually all HTML has some wikitext equivalent, even if that's only a template that applies the tags. But some HTML is tolerated more than others. I recently put this tag on a large number of articles, and all of them have some tag which is strongly deprecated. After some confusion I've started leaving comments on individual articles pointing out which tags are unwanted, though some early articles just have a ton.  Is there a specific article I can take a look at for you and figure out what needs to be changed? I also changed the template text to encourage editors to leave me a note if that's unclear. I was trying to add a parameter so that this information shows up as part of the template message, but it uses complicated syntax and I couldn't easily find a way to do that.  or anyone else, any ideas?


 * There are definitely pros and cons to this sort of tagging, a big pro being that gets the attention of editors interested in the article and for generally already-tidy articles greatly decreases the time it take to make repairs. But this tag often appears on generally untidy, younger articles that haven't been wikified yet. Apparently it's been used by WikiProject Wikify since 2010, and there are lots of similar tags that put articles somewhere under Category:Articles covered by WikiProject Wikify for relatively minor or major issues. Maybe with better instructions we can just quickly resolve these problems and be done with the question, but I'm also open to a different workflow if the WikiProject wants to change that. -- Beland (talk) 17:38, 28 February 2019 (UTC)


 * There are now (I hope really good) instructions for finding the offending tags at Category:Articles with HTML markup. -- Beland (talk) 02:14, 2 March 2019 (UTC)
 * I have just figured out how to use advanced template syntax to make the box indicate which tags were found on the page, if you add something like "|tags=tt", so that should make things much easier for new additions. -- Beland (talk) 03:22, 2 March 2019 (UTC)


 * Thanks, that’s useful information, but I still have a feeling that the template and the policy are out of step. There must once have been a categorical statement that certain HTML tags were deprecated, but the closest I can see to it now is the words ‘In general, wikitext formatting is considered easier to use than HTML and wikitext is preferred if there are equivalents’ (Manual of Style). This may be an intentional softening, or the earlier statement may have got lost in editing. Colin.champion (talk) 09:12, 2 March 2019 (UTC)
 * I agree; that section of the MOS isn't very specific. I've actually tried to propose various additions to specify what sort of HTML entities are to be avoided, and they got enough pushback from other editors to keep them from being included there. Part of that is that people wanted the MOS to operate in a bottom-up fashion, to let a consensus emerge from de facto practice, and just document existing practices. Another issue was that people wanted to avoid a very long, proscriptive, potentially rigid manual. The combination of these two desires seems to have resulted in a lot of guidance being left up to individual WikiProjects. Historically, I think most of the de-HTML-ification has been handled by WikiProject Wikify, which just generally replaced HTML with wikitext back in the day when people weren't doing very complicated things, and which continues to do basic conversions for content from editors not familiar with wikitext. There have also been purges of invalid HTML due to the turning off of HTML tidy, and of obsolete HTML due to the new HTML 5 standard (at HTML 5). With the Typo Team/moss project, I'm doing a comprehensive spell check of all articles, and fixing markup problems detected along the way. That's enables me to find all the instances of things that are either just broken or obsolete or which are contraindicated by the long-standing wikification consensus. But it has also brought to light some situations where there isn't a clear consensus, or where the how-to part isn't documented. So in some cases I'm right now trying to build consensus on certain tags, either with a deletion proposal, or just by editing a bunch of articles that use that tag to see if editors that are monitoring those articles agree with the way I do the cleanup. So the instructions I put together are very new, but after a few weeks and possibly some tweaks based on editor feedback, I think there would be a good case that they represent a consensus approach, and should be cross-referenced from the MOS. I'll give myself a TODO item for that. Sorry for the long-winded explanation, but thanks for pointing out that shortcoming. -- Beland (talk) 20:14, 2 March 2019 (UTC)
 * Incidentally I don’t think it’s true that a blank line between paragraphs is always equivalent to &lt;p&gt;: the former seems to have no effect within a blockquote whereas the latter splits the quote into paragraphs. Colin.champion (talk) 13:51, 2 March 2019 (UTC)

Hmm, this works for me: Paragraph 1

Paragraph 2

Paragraph 3

Are you seeing the three paragraphs above on separate lines in your browser? -- Beland (talk) 20:14, 2 March 2019 (UTC)


 * Like you I get separate lines. But if I edit Mr Keynes and the "Classics", deleting the &lt;p&gt; and putting a line break in its place, then the quotation is a single para. I don’t understand. But thanks for your explanation of the current position on policy. Colin.champion (talk) 08:21, 3 March 2019 (UTC)


 * I fixed Mr Keynes and the "Classics" by adding more whitespace around the blockquote, which also helps make the wikitext more readable. I'll add a note to the blockquote documentation that this might be required. -- Beland (talk) 19:18, 3 March 2019 (UTC)


 * Thanks again. Now I can eschew &lt;p&gt;s in future. But this must be a bug in the wikitext processor. Colin.champion (talk) 07:52, 4 March 2019 (UTC)