Page MenuHomePhabricator

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


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

Version: unspecified
Severity: normal



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.

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

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

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