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

bzimport added a project: Parsoid.Via ConduitNov 22 2014, 1:57 AM
bzimport set Reference to bz51786.
Thryduulf created this task.Via LegacyJul 21 2013, 9:53 PM
Thryduulf added a comment.Via ConduitJul 21 2013, 9:53 PM

Sorry that's bug 51172

ssastry added a comment.Via ConduitJul 22 2013, 2:32 PM

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 ***

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.