Page MenuHomePhabricator

Don't allow users to put an image inside a caption inside a caption in the visual editor
Open, LowestPublic

Description

In the wikitext editor, you can put an image inside another image's caption. You can also do that in the visual editor. So far so good.

If you try to double nest images in the wikitext editor (for example, [[ File:Example.jpg | thumb | [[ File:Example.jpg | thumb | [[ File:Example.jpg | thumb ]] ]] ]]) things will break:

Screen Shot 2015-07-23 at 19.53.17.png (932×1 px, 169 KB)

However, you can do the same thing in the visual editor and it appears to work fine:

Screen_Shot_2013-11-04_at_12.02.32_PM.png (601×401 px, 218 KB)

It's only once you save that you realize you've produced broken wikitext. Ideally, we'd somehow prevent the user from doing something like this in the first place.

Details

Reference
bz56579

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:37 AM
bzimport set Reference to bz56579.

Created attachment 13696
In view mode

Attached:

Screen_Shot_2013-11-04_at_12.04.09_PM.png (421×331 px, 134 KB)

Also the wiki text for the image insertion shows up in the view mode.
See the attchment

Created attachment 13697
Wikitext for the images

Attached:

Screen_Shot_2013-11-04_at_12.05.46_PM.png (142×801 px, 18 KB)

nshahquinn-wmf renamed this task from VisualEditor: The nested option to insert a media into a media creates inconsistency in test2 environment to Don't allow users to put an image inside a caption inside a caption in the visual editor.Jul 24 2015, 2:57 AM
nshahquinn-wmf triaged this task as Lowest priority.
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf set Security to None.

Setting priority to lowest because no sane user would do such a thing (I hope :)