Page MenuHomePhabricator

VisualEditor: Caption tags are stripped from tables when VE converts data model to DOM
Closed, ResolvedPublic

Description

  1. Go to: http://ve-change-marking.instance-proxy.wmflabs.org/wiki/Test2
  2. Open page in VisualEditor
  3. Open browser console.
  4. Run ve.dm.converter.getDomFromData( ve.instances[0].documentModel.store, ve.instances[0].documentModel.data.data ).body.outerHTML
  5. You get the following output: --------------

<body><table data-parsoid="{&quot;tsr&quot;:[0,3],&quot;dsr&quot;:[0,49,3,2]}">
This is a caption
<tbody data-parsoid="{&quot;dsr&quot;:[24,47,0,0]}"><tr data-parsoid="{&quot;tsr&quot;:[24,26],&quot;startTagSrc&quot;:&quot;|-&quot;,&quot;autoInsertedEnd&quot;:true,&quot;dsr&quot;:[24,46,2,0]}">
<td data-parsoid="{&quot;tsr&quot;:[27,28],&quot;autoInsertedEnd&quot;:true,&quot;dsr&quot;:[27,46,1,0]}">Table cell content</td></tr>

</tbody></table></body>

Notice the missing <caption> .. </caption> tags.
So, when Parsoid gets this, the caption is fostered out and shows up as a diff.


Version: unspecified
Severity: major

Details

Reference
bz47349