Cannot use templates in <gallery> caption
Open, NormalPublic


Author: vlakoff

If I do:

<gallery caption="foo {{some template}} bar">
Image_PlaceHolder.png|Caption of the picture

... the caption isn't expanded at all and displays as "foo {{some template}} bar"

If I do:

Image_PlaceHolder.png{{!}}Caption of the picture

caption=foo {{some template}} bar


... The caption is expanded but HTML code is escaped so it displays as "foo <span><div><sup>[etc.] bar"

An example is provided here:

Expected result: The caption should be expanded, ideally in both cases; sadly I presume it would require to add a new syntax, because of the first case.

In order to prove the usefulness of the asked fix:

  • there is no problem in putting HTML elements into a <caption> element[1][2], in case <gallery> would use this element in the future
  • on the French Wikipedia we are working on making accessible abbreviation templates, using <abbr>[3], so that their result is readable by speech synthesizers.


Version: 1.18.x
Severity: enhancement


bzimport set Reference to bz31517.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Oct 8 2011, 9:30 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 14 2015, 11:12 PM

Add Comment