Page MenuHomePhabricator

Empty elements in DOM: PHP parser+tidy strips them; Parsoid doesn't
Closed, DeclinedPublic


The infobox in itwiki:Luna has several empty rows "....|-\n|-\n....". PHP parser + Tidy combo strips them whereas Parsoid doesn't. This causes rendering visual diffs on itwiki:Luna

Reproducible with a simple test case: "{|\n|-\n|-\n|-\n|foo\n}"

What is the right behavior here?

Version: unspecified
Severity: normal



Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 3:29 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz67452.

This patch is now merged .. the only remaining issue are empty elements found in top-level content. We are going to leave them behind for now so that editors can edit them in VE (rather than hide them and make them uneditable) and maybe delete them.

Arlolra raised the priority of this task from Lowest to Medium.Nov 25 2014, 8:20 PM
Arlolra added a subscriber: Arlolra.

Tidy was responsible for this. RemexHtml doesn't. At this point, both RemexHtml and Parsoid leave empty elements behind but tag empty trs and lis with a mw-empty-elt css class for skins to suppress them.