Page MenuHomePhabricator

Caption editing lets you insert text into the caption that changes the image formatting
Closed, DuplicatePublic

Description

Steps to reproduce:

  1. Edit a page in the visual editor.
  2. Insert an image, such as [[File:Sanxbox.JPG]], with the default settings.
  3. Change the image's caption to left|This is my caption.
  4. Save the page.

Expected output:

  • The image is exactly as it appeared whilst editing: a thumb, on the right of the page, with the caption left|This is my caption.

Screen Shot 2018-04-12 at 17.16.19.png (934×2 px, 344 KB)

Actual output:

  • The page is different from it appeared whilst editing: a thumb, on the left of the page, with the caption This is my caption.

Screen Shot 2018-04-12 at 17.16.27.png (786×2 px, 355 KB)

This happens because changing the caption to left|This is my caption. changes the wikitext of the image to [[File:Sanxbox.JPG|thumb|left|This is my caption.]] which then has the obvious effect of moving the image to the left.