Page MenuHomePhabricator

Parsoid: One missing apostrophe causes corruption across table cells
Closed, ResolvedPublic

Description

Minimal test case:

{|

-
align=left colspan=3'''Valid Votes''''''38,847'''''100.00%'''
}

Note that the bolding of 38,847 is not closed correctly: one quote is missing.

The PHP parser renders this (correctly) as:
<td><b>Valid Votes</b></td><td>'<i>Valid Votes</i></td><td><b>100.00%</b></td>

Parsoid renders this in an ... interesting way:
<td>'<i>Valid Votes<b></b></i></td>38,847</td><td><b>100.00%</b></td>

Note the stray quote before Valid Votes, the fact that Valid Votes is now in italic, the empty <b> tag, and the fact that 38,847 is completely unformatted.

Because the output HTML is so weird, this obviously doesn't round-trip right either:

align="left" colspan="3"'''Valid Votes''''''''38,847'''100.00%'''

The real-world test case that brought this to my attention is http://parsoid.wmflabs.org/_rt/en/Wellawatte-Galkissa_Electoral_District?oldid=377319087


Version: unspecified
Severity: normal

Details

Reference
bz50447

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:52 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz50447.
Catrope created this task.Jun 30 2013, 6:20 AM

Change 71312 had a related patch set uploaded by Subramanya Sastry:
(Bug 50447) Quote balancing should not cross td/th boundaries

https://gerrit.wikimedia.org/r/71312

Change 71312 merged by jenkins-bot:
(Bug 50447) Quote balancing should not cross td/th boundaries

https://gerrit.wikimedia.org/r/71312

[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]