Page MenuHomePhabricator

Using indentation markers together with HTML table tags can result in incorrect parsing outcomes.
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Test the following three types of wikitext:
  1. Indentation marker + wikitext table
:abc
:{|
|-
|
|}
:aaa
abc
  1. Indentation marker + single-line HTML table
:abc
:<table><tr><td></td></tr></table>
:aaa
  1. Indentation marker + multi-line HTML table
:abc
:<table>
	<tr>
		<td>
		</td>
	</tr>
</table>
:aaa
abc

What happens?:
Actual output for case 3 (multi-line HTML table):

<dl><dd>abc</dd>
<dd><table><tbody><tr><td></td></tr></tbody></table>
<dl><dd>aaa</dd></dl>
<p>abc</p>
</dd></dl>

The misnested tags result in broken layout and incorrect rendering.

What should have happened instead?:
Expected output for all three:

<dl><dd>abc</dd></dl>
<dl><dd><table><tbody><tr><td></td></tr></tbody></table></dd></dl>
<dl><dd>aaa</dd></dl>
<p>abc</p>

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
MediaWiki REL1_39 ~ Current, Behavior in earlier versions has not been tested.

Other information (browser name/version, screenshots, etc.):
The currently deployed Parsoid does not exhibit this issue.