Page MenuHomePhabricator

Malformed attribute in table (="text-align:left" align=center) not hidden from view
Closed, ResolvedPublic

Details

Reference
bz53233

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:11 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz53233.

The wikitext here is malformed:

{|class="wikitable" ="text-align:left" align=center

… is becoming:

="text-align:left" align=center{|class="wikitable" ="text-align:left" align=center

on round-trip through Parsoid.

Of course, the wikitext should instead be the following:

{| class="wikitable" style="text-align:left" align=center

… but VE/Parsoid should ideally not corrupt this. :-)

(Moved to Parsoid because VE is claiming not to have dirtied the DOM.)

This is still the case without selective serialization [1], but fixed in production [2] (although the save currently times out). Those broken attributes are still recognized as text and then fostered out, but this fostered content is now properly detected and handled by the selective serialization algorithm so that it does not normally produce dirty diffs.

While the original bug is fixed, I'm leaving this bug open as we should try harder to match invalid attributes on table start tags, so that those are not fostered out later.

[1]: http://parsoid.wmflabs.org/_rt/es/Bilbao?oldid=69046152
[2]: http://es.wikipedia.org/w/index.php?title=Usuario:GWicke/test1&veaction=edit

Updated subject to reflect that this no longer corrupts, but does not render perfectly either.

Arlolra set Security to None.