Page MenuHomePhabricator

[Bug Report] CSS content inserted into translated article text
Open, Needs TriagePublic

Description

Content Translation appears to have inserted stylesheet content into article wikitext as literal <nowiki> text.

Examples:

The affected page source contains CSS such as .mw-parser-output, @media, and related style declarations inside <nowiki> blocks. Article histories indicate that this content was introduced when the pages were created or edited using Content Translation.

Because the CSS is stored as literal article text, downstream HTML and abstract consumers expose it as readable content.

Expected behavior

Content Translation should not serialize stylesheet or TemplateStyles content into translated article wikitext as literal <nowiki> text.

Actual behavior

CSS declarations are persisted in the article source and subsequently exposed as article text.

Impact

We identified 74 potentially affected articles across 7 projects:

  • ffwiki: 52
  • igwiki: 13
  • hawiki: 3
  • lgwiki: 3
  • fawiki: 1
  • tewiki: 1
  • kowiki: 1

Event Timeline

LDlulisa-WMF renamed this task from [Bug Report] Content Translation inserts CSS as literal nowiki text into translated articles to [Bug Report] CSS content inserted into translated article text.Sep 16 2026, 7:08 PM
LDlulisa-WMF updated the task description. (Show Details)

Complete list of 74 affected articles across 7 projects:

fawiki

tewiki

hawiki

igwiki

lgwiki

kowiki

ffwiki

Not a fix. just an analysis:

In all cases the injected css is this:

.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}

This is reflist related CSS,

Going through the articles:

tewiki

జయసూర్యా అభిరామ్ — https://te.wikipedia.org/wiki/జయసూర్యా_అభిరామ్ - Published on  22 July 2025. Has css in the published article since. - duplicate of the above one

hawiki

Kabari na Baron na Hirsch, Montreal — https://ha.wikipedia.org/wiki/Kabari_na_Baron_na_Hirsch,_Montreal - Published on 30 dec 2025 using CX
Hukumar Kare Hakkin Dan Adam (Saudi Arabia) — https://ha.wikipedia.org/wiki/Hukumar_Kare_Hakkin_Dan_Adam_(Saudi_Arabia) - Published on Aug 2025 using CX
Qari Abdullah — https://ha.wikipedia.org/wiki/Qari_Abdullah

most of the ff and ig wiki has the following nature:

image.png (1,459×1,192 px, 388 KB)

The css texdt appear before the `{{Databox}} template

Source wikitext :

{{Short description|Tanzanian Member of Parliament}}
{{Infobox officeholder
|honorific-prefix   = [[Honourable]]
|name               = Rashid Omar
|honorific-suffix   = [[Member of Parliament|MP]]
|image              = 
|imagesize          = 
|alt                = 
|caption            = 
|order              = 
|office             = [[Member of Parliament (Tanzania)|Member of Parliament]] <br> for Kojani
|term_start         = November 2010
|term_end           =
|predecessor        = Salim Mohamed  
|successor          = 
|birth_date         = {{birth date and age|1961|1|13|df=y}}
|birth_place        = [[Sultanate of Zanzibar]]
|birthname          = 
|nationality        = [[Tanzania]]n
|party              = [[Civic United Front|CUF]]
|spouse             = 
|relations          = 
|children           = 
|residence          = 
|alma_mater         = 
|occupation         = 
|profession         =  
|religion           = 
|website            = 
|footnotes          = 
}}

'''Rashid Ali Omar''' (born 13 January 1961) is a Tanzanian [[Civic United Front|CUF]] politician and [[Member of Parliament]] for Kojani constituency since 2010.<ref>{{cite web |url=http://www.parliament.go.tz/index.php/members/mpcvs/1706/2010-2015 |title=Member of Parliament CV |last1= |first1= |last2= |first2= |year=2010 |website= |publisher=[[Parliament of Tanzania]] |accessdate=9 November 2013}}</ref>

==References==
{{Reflist}}

{{Current CUF MPs}}

{{DEFAULTSORT:Omar, Rashid}}
[[Category:Living people]]
[[Category:1961 births]]
[[Category:Civic United Front MPs]]
[[Category:Tanzanian MPs 2010–2015]]
[[Category:Utaani Secondary School alumni]]
[[Category:Shenge Juu Secondary School alumni]]
[[Category:Zanzibari politicians]]


{{Tanzania-politician-stub}}

Translated wiktext:

<nowiki>.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</nowiki>

{{Databox}}Rashid Ali Omar (jibinaa ko 13 lewru Yarkomaa 1961) ko politik CUF mo Tansani, kadi ko tergal parlemaa to diiwaan Kojani gila 2010.

== Firooji ==

[[Category:Tanzania]]

This is quite interesting since the source template Infobox officeholder is not available in ff.wikipedia. So CX will show a black area with warning. Did the translator manually inserted {{Databox}}? All of these translations I checked are done by same user. So did the user tried any particlular method? These ff.wikipedia translations from 2024. I am more curious why the translator did not notice this big css blob appearing on top of article while publishing? These published articles are the only revision too.

Thanks for digging into this, @santhosh.

This issue was discovered through the downstream Wikimedia Enterprise pipeline, so we cannot determine what the translator saw, whether {{Databox}} was added manually, or why the published result was not subsequently corrected.

Our pipeline received these revisions through the MediaWiki streams after they had already been published.

Handing over this ticket to the current on-call engineer, @KMontalva-WMF, for tracking.