Page MenuHomePhabricator

Random <i> tag wrapping .mw-content-container in Vector-2022
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • The cause of this is bad wikicode on part of the editors – the wikitext of the header Ime nkịrịka" is ''Ime nkịrịka". If you remove the italic from that header, the article appears more normal. However, the bad formatting of wikicode shouldn't bleed out to the rest of the page like this, especially not creating tags outside of the .mw-content-container. If you inspect the TOC, you will also see that there are some stray <i> tags there.

What happens?:

  • A stray <i> element is wrapping .mw-content-container

What should have happened instead?:

  • Bad wikicode on part of editors shouldn't affect anything outside of .mw-content-container.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

I noticed it has a similar (but smaller) effect in other skins as well: In other skins, the "edit | edit source" is also italic, and the next point in the TOC is italic, as well as a stray empty <i> element in the TOC. The same in Monobook, Timeless and CologneBlue.

Jdlrobson added subscribers: cscott, Jdlrobson.

On second thought, This might be slightly different so reopening but this looks like an issue with the parser rather than the skin. @cscott could you please take a look?

It sure looks like the same issue; I think the extra effects in Vector-2022 stem from the fact that the TOC is outside of the mw-content-container, so that amplifies the impact for that particular skin, but there are still some effects in all skins. Seems like a parser issue, yeah.

This (and the other task I think) are lint errors that should be reported in Special:LintErrors and corrected by users.

This (and the other task I think) are lint errors that should be reported in Special:LintErrors and corrected by users.

Well, yes and no. The bug is caused by a lint error, and the lint error should indeed be fixed. But the bug is about lint errors causing changes to HTML outside of the content container, which is definitely a bug that needs to be fixed on the software side.

definitely a bug that needs to be fixed on the software side.

Not really. The behavior that is being exhibited is not new: the malformed HTML is ending up in the TOC, which has been an issue since A While Now. This is escaping into the chrome now, so it may be more interesting, but it's ultimately still up to the wiki editors to correct the issue.

Yeah, no, that's a hard disagree from me.

Well if you open a div then it is forced to end at the end of the article. This is usually done in MW. So I would argue this is a sanitization problem in that the content provided by users is not made safe.

Note how 1.8 below is partially italic and the rest is all italic. Those effects definitely should not travel down the ToC.

obraz.png (800×244 px, 35 KB)

This is from another example/manifestation of this bug:
https://meta.wikimedia.org/w/index.php?title=Talk:Campaigns/Foundation_Product_Team/Registration&oldid=24426248&useskin=vector-2022

Side note: It was easier to see how broken it is in my subskin/theme. So you might say Vector 2022 handled it better then my CSS 😅

obraz.png (1×1 px, 206 KB)