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

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz40306.
Giftpflanze created this task.Via LegacySep 17 2012, 7:16 PM
TheDJ added a comment.Via ConduitSep 17 2012, 7:44 PM

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.

Ciencia_Al_Poder added a comment.Via ConduitSep 17 2012, 7:58 PM

(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]

hashar added a comment.Via ConduitSep 17 2012, 8:39 PM

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

TheDJ added a comment.Via ConduitSep 18 2012, 12:10 AM

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

TheDJ added a comment.Via ConduitSep 18 2012, 11:25 AM
  • Bug 40323 has been marked as a duplicate of this bug. ***
TheDJ added a comment.Via ConduitSep 18 2012, 11:26 AM
  • Bug 40324 has been marked as a duplicate of this bug. ***
hashar added a comment.Via ConduitSep 18 2012, 12:54 PM

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.

Add Comment