Page MenuHomePhabricator

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

Description

Search for 'SPAZI TRA LE COLONNE' in

http://parsoid-lb.eqiad.wikimedia.org/itwiki/Pagina_principale?oldid=65679446

Apparently a table row is not recognized as such.


Version: unspecified
Severity: normal

Details

Reference
bz67007

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 https://gerrit.wikimedia.org/r/#/c/141587/ 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">
{{FinestraHome7

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

{{Pagina principale/Vetrina}}
}}
</div>

This wikitext fix would avoid the issue:

https://it.wikipedia.org/w/index.php?title=Utente%
3AGWicke%2Fmainpage&diff=66666719&oldid=66666189

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 https://www.mediawiki.org/wiki/User:GWicke/Test/FosterParent 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.

wikitext:

{| cellpadding="1"
<table id="2">
<td>text</td>
</table>

<!-- comment -->
some more text
}

php:

<table cellpadding="1">
<tr>
<td>text</td>
</tr>
</table>

some more text

parsoid:

<table cellpadding="1"></table>
<table id="2">
<tr>
<td>text</td>
</tr>
</table>

<!-- 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>
</table>

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