Page MenuHomePhabricator

Unclosed tables are shown after the following text
Open, MediumPublic

Description

The wikitext (note the table ending with an open tr)

A
{|
! B
|-
C

parses as

<p>A</p>
<p>C</p>
<table>
<tbody><tr>
<th>B</th>
</tr>
</tbody></table>

In the original example the table ended with |-}, C was some amount of text including headlines etc., the table appeared at the very end of the article.

One can't expect a perfect output for incorrect input, but at least the order should remain the same.


Version: 1.18.x
Severity: normal

Details

Reference
bz32373

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:01 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz32373.
bzimport added a subscriber: Unknown Object (MLST).

Without html tidy the html output is:
<p>A
</p>

<table> <tr> <th> B </th></tr> C </table>

The table is at the right please, but the browser (at least IE8) shows it in another order (the same order, which is also produced from html tidy):

A

C

B

As I recall this is pretty typical browser behavior; text that's randomly spewed into the <table> but outside any <tr>s gets shown at the start, then it shows the caption, header, rows, footer.

  • Bug 41236 has been marked as a duplicate of this bug. ***
  • Bug 57730 has been marked as a duplicate of this bug. ***