Page MenuHomePhabricator

Thumbnails in table caption get hoisted outside the table
Closed, DuplicatePublic

Description

Testcase: http://en.wikipedia.beta.wmflabs.org/wiki/T76100_test

Steps to reproduce:

  1. VE - insert a table and add a caption.
  2. click in the Caption and type some text and then Insert Media ->the inserted media will be placed inside of the Caption boundaries(a border with thin grey line).

<figure class="ve-ce-mwBlockImageNode ve-ce-mwBlockImageNode-type-thumb mw-default-size ve-ce-branchNode ve-ce-mwBlockImageNode-borderwrap mw-halign-right ve-ce-focusableNode" typeof="mw:Image/Thumb" style="width: 222px; height: auto;" contenteditable="false">

  1. Save the page - the image gets de-attached from a table's caption(the screenshots are attached).

VE_table_caption_with_Inserted_media.png (346×694 px, 46 KB)

caption_with_Media_after_Save.png (343×717 px, 51 KB)

Event Timeline

Etonkovidova raised the priority of this task from to Needs Triage.
Etonkovidova updated the task description. (Show Details)
Etonkovidova changed Security from none to None.
Etonkovidova subscribed.
matmarex renamed this task from Inserted media in Table Caption gets de-attached after Save to Thumbnails in table caption get hoisted outside the table.EditedDec 21 2014, 2:03 PM
matmarex subscribed.

This is a Tidy issue – doesn't happen with $wgUseTidy = false. Doesn't happen with Parsoid, either.

Can be reproduced with the following wikitext:

{| class="wikitable"
|+ Caption [[File:Example.jpg|thumb]] more caption
|-
| table cell
|}

The thumbnailed image and the text "more caption" are hoisted out of the table caption to a separate paragraph before the table.

http://en.wikipedia.beta.wmflabs.org/wiki/T76100_test

(Using just [[File:Example.jpg]] doesn't show the problem.)

Aklapper subscribed.

Seems like the upstream bug is https://github.com/htacg/tidy-html5/issues/196 ?
If so it is fixed since Apr 2015.

If that's the right upstream ticket this should be fixed in version 4.9.28. Now which version of Tidy are we running on servers...? In any case: Still an issue.