Page MenuHomePhabricator

Inserting a list into an image caption renders raw wikitext
Open, Needs TriagePublic

Description

Steps:

  • paste an image with a caption from another page
  • change the caption and add a list there

While editing, the list is perfectly rendered, when saved, I have a raw list.

check on this diff, line 31.

Event Timeline

Does it look like the list is formatted as a list in the visual editor? Ideally, it wouldn't, because wikitext doesn't support lists in image captions: T18768: Wikitext in image captions displayed as plaintext

It is formatted as a list when I edited it.

Wikitext lists are not supported in image captions, so the editor should not let you do this.

In the media dialog the list tool is hidden, and when I added inline caption editing (T149753) it was a known limitation that we couldn't easily hide tools from the main toolbar based on the context of being in a caption.

I should've file this as a follow-up task at the time so thanks for doing this.

See also T58579