Page MenuHomePhabricator

<table> in fosterable position in another <table> - tidy (html4) vs html5 treebuilding differences
Closed, DuplicatePublic


Search for 'SPAZI TRA LE COLONNE' in

Apparently a table row is not recognized as such.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:34 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz67007.

Interesting how these come in spurts .. Arlo is currently working on which is for bug 66686

  • This bug has been marked as a duplicate of bug 66686 ***

The spurt is Nemo_bis in MediaWiki-General reporting issues ;)

I meant: the bug has been around for ages, and in the span of a week, it is encountered twice. :)

Sorry, not a dupe .. it looked very similar to the other issue with empty comment lines and unrecognized table cells following that.

I'm not sure if editing the page is the right thing to do here, but most of the content is being placed in a fosterable position:

{| cellpadding="2" cellspacing="5" style="width:100%; vertical-align:top; background:transparent;"
<!-- ==============VETRINA ================ -->
<div id="mf-viv" title="Novità in Vetrina">

titolo= Vetrina
logosfondo= Bluebg_rounded_croped.png
logo= HSUtvald.svg
px= 38

{{Pagina principale/Vetrina}}

This wikitext fix would avoid the issue:

I agree that this seems to be broken wikitext, which tidy probably handles with a special heuristic.

I'm still not sure why Parsoid renders this broken wikitext differently from PHP. A simple test case at shows PHP+tidy fostering as well.

Should we keep this open for now until we have an idea if this is a really rare issue, or something that matters in practice & should be addressed?

Here's another test case,


<table></table> |<!-- comment --> }}

sorry, that should end in |}

The difference seems to be in how tables in fosterable position are resolved.


{| cellpadding="1"
<table id="2">

<!-- comment -->
some more text


<table cellpadding="1">

some more text


<table cellpadding="1"></table>
<table id="2">

<!-- comment -->
some more text

Parsoid's behavior which derives from HTML5 treebuilding seems consistent with browser behavior on the following html.

<table> <table> <td>text</td> </table>

<td>some more text</td>

That html is rendered as follows in FF:

<table></table> <table> <td>text</td> </table>

some more text

So, this is one more instance of html4 tidy vs html5 tree building behavior differences.

Arlolra removed GWicke as the assignee of this task.Nov 25 2014, 7:56 PM
Arlolra set Security to None.
ssastry moved this task from Backlog to Robustness on the Parsoid board.Dec 22 2014, 12:37 AM
marcoil moved this task from Robustness to Backlog on the Parsoid board.Feb 13 2015, 12:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 13 2015, 4:50 PM