Page MenuHomePhabricator

Parsoid doesn't handle unclosed table attributes (because of missing quote) in all scenarios
Closed, ResolvedPublic

Description

A user on the English Wikipedia reports that when saving an edit to the lead of an article in Visual Editor, a table lower down the page was "modified and broken":

https://en.wikipedia.org/w/index.php?title=2013_Hillsboro_Hops_season&diff=565234138&oldid=565068343

Note that it didn't alter the opening of the table.

About a week prior, an edit with VE to a page in my userspace that contains an unfinished and unclosed table similarly had all the table syntax deleted exlcuding the first line of the table. https://en.wikipedia.org/w/index.php?title=User:Thryduulf/Hierarchy_of_content_decisions&diff=564156742&oldid=564156599

This is obviously very broken in that it leads to significant content corruption, even running together words in the in the second example.

It doesn't happen every time, for example I wasn't able to reproduce it in my sandbox https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox&diff=565239631&oldid=565239447 and earlier tests showed that simply removing the closing |} is not sufficient to trigger this.

Possibly this is related to bug 50104 and/or 51172


Version: unspecified
Severity: normal

Details

Reference
bz51786

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:57 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz51786.

The problem with [[Hillsboro_Hops_season]] is unclosed quotes for the bgcolor attribute (see snippet below):

...

- align="center" bgcolor="

...

Parsoid does attempt to deal with unclosed quotes in table attributes, but its handing can be further improved. (See bug 49839). For now, I would recommend fixing the page.

You can reproduce the bug with the following snippet in your sandbox (all the wikitext elements below are necessary for the bug to show up in its nasty form -- with some pieces removed, Parsoid handles it much better).

:{|

-

! bgcolor="bbbbbb" | Game postponed

}

{|

- bgcolor="
ab
}
  • This bug has been marked as a duplicate of bug 49839 ***