Page MenuHomePhabricator

Incorrect parse of table cell
Open, LowPublic

Description

This snippet:

{|
|a
b||c
|}

is parsed as <table><td>a\nb</td><td>c</td></table> by Parsoid and <table><td>a\nb||c</td></table> (simplified normalized HTML) by PHP parser.

This difference in parse affects multiple things (a) serialization of <td>a\nb</td><td>c</td> (b) unnecessary nowiking in <td>a\nb||c</td>.

T149209 is related. The current fix for T149209 doesn't factor in the impact of this edge case difference. As part of fixing this bug, code written for that bug would need to be fixed up as well.

Event Timeline

Arlolra triaged this task as Medium priority.Dec 2 2016, 7:32 PM

Apparently this was identified in https://gerrit.wikimedia.org/r/#/c/216015/ and filed as T102305 quite a while ago.

Also seen at the Chinese Wikipedia, when an editor tried to put the {{User China}} template inside a table. Reported at https://www.mediawiki.org/wiki/Topic:Ve2969t380zgiywx and discussed more at the user's zhwiki talk page.

LGoto lowered the priority of this task from Medium to Low.Jun 25 2020, 6:25 PM