Page MenuHomePhabricator

Align HTML4 -> HTML5 transform broken on tablerows.
Closed, ResolvedPublic

Description

On https://de.wikipedia.org/w/index.php?title=Wikipedia:Checkuser/Wahl/September_2012/Zwischenst%C3%A4nde&action=submit, when clicking on preview, the table is totally crazy. It is reported that it is the same on normal view. May be HTML5 related?


Version: unspecified
Severity: normal
OS: Linux

Details

Reference
bz40306

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:57 AM
bzimport set Reference to bz40306.
bzimport added a subscriber: Unknown Object (MLST).

Caused by the align on table rows being incorrectly transformed to float, whereas align on table rows determines content alignment.

This is a bug in our HTML4->HTML5 normalization. Should be easy to fix.

(edit conflict)

When a table row has align=right it's now converted to <tr style="float:
right;">!! which causes this weird display.

This is caused by Gerrit change 13479 -> Anything that are not cells (td, th)
and has align is converted to float, except if it's align=center. It should
have included table rows as well.

This problem surfaces now because of bug 27478

It happens when preview because the switch to HTML5 has been done recently.
When the page cache is refreshed, it will look weird also on page view (unless
HTMLTidy is sanitizing it)

[Importance changed to high]

The Gerrit change #24076 makes it so <tr align="X"> is converted to use the style="text-align: X;" for TR elements.

New patchset submitted (though for some reason it seems to have picked the cherry picked version on the wmf12 branch.

  • Bug 40323 has been marked as a duplicate of this bug. ***
  • Bug 40324 has been marked as a duplicate of this bug. ***

Tested change on https://test.wikipedia.org/wiki/Bug40306

Deployed it live at Tue, 18 Sep 2012 12:53:40 +0000

Pages in squid cache will need to be purged manually. That will self fix whenever an edit is made.