Page MenuHomePhabricator

Wikitext in image captions displayed as plaintext
Open, LowPublic

Description

Lists in image captions are not displayed as lists but rather as unformated text.

Example:

[[Image:Incandescent light bulb.svg|thumb|left|upright|
#Glass bulb
#Inert gas
#Tungsten filament
#Contact wire (goes to foot)
#Contact wire (goes to base)
#Support wires
#Glass mount/support
#Base contact wire
#Screw threads
#Insulation
#Electrical foot contact
]]

One would expect the caption will be displayed as a list of items. But the caption looks like: "#Glass bulb #Inert gas #Tungsten filament #Contact wire (goes to foot) #Contact wire (goes to base) #Support wires #Glass mount/support #Base contact wire #Screw threads #Insulation #Electrical foot contact"

It's reproducible always (Mediawiki used currently in Wikipedia). The same problem is also with unordered lists.

I tried to find a similar bug but I did not succeed. Sorry, if it is a duplicate.

Details

Reference
bz16768

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:28 PM
bzimport set Reference to bz16768.
bzimport added a subscriber: Unknown Object (MLST).

I've done some further testing:

This bug applies for all types of lists: unordered, ordered, definition and paragraphs (one empty line between lines with texts) - these constructions are ignored.

Tables are parsed properly as well as headlines, horizontal rule, bold, italic, links, even signature, math and another image are parsed and displayed correctly.

Using HTML for lists works too.

Unless this is a regression, I fail to see any case for tagging it high/major.

Just for the record:

[[File:Example.png|thumb|<poem>
#foo
#bar
#baz
</poem>]]

creates the _almost_ proper (all but last <li> contain <br />) list though - but I am almost sure it's just because of bug in <poem> which should handle it rather like <nowiki>#foo</nowiki> instead of parsing it.

  • Bug 17780 has been marked as a duplicate of this bug. ***
  • Bug 20370 has been marked as a duplicate of this bug. ***

Punting this to the new parser Brion has under development.

https://en.wikipedia.org/wiki/File:Incandescent_light_bulb.svg nowadays correctly displays a list in the description. Going to the revision from 2008 when this bug report was filed is also rendered correctly on https://commons.wikimedia.org/w/index.php?title=File:Incandescent_light_bulb.svg&oldid=16753721

Hence closing as FIXED.

Yes, the description of the image can contain list (and it always did, I assume). But the example from the description of this bug does not work yet. It is a completely different case.

Check this URL: https://en.wikipedia.org/wiki/User:Miraceti/sandbox/bulb