Page MenuHomePhabricator

TableFixups getting tripped up on pipe entities
Closed, ResolvedPublic

Description

See the discussion in https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/751467/1/src/Wt2Html/PP/Handlers/TableFixups.php#b276 from I0e57633b41796661565a7beb46e3309b5b0b8415

An example could be,

{|
|{{1x|test | 123}} 456
|}

which is parsed as,

<table>
<tbody><tr>
<td>test &#124; 123 456
</td></tr></tbody></table>
<p><br />

vs

<table data-parsoid='{"dsr":[0,33,2,2]}'>
<tbody data-parsoid='{"dsr":[3,31,0,0]}'><tr data-parsoid='{"autoInsertedStart":true,"dsr":[3,30,0,0]}'><td typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"dsr":[3,30,1,0,1,0],"pi":[[{"k":"1"}]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"test &amp;#124; 123"}},"i":0}}," 456"]}'>123 456</td></tr>
</tbody></table>

Event Timeline

Arlolra triaged this task as Medium priority.Jan 5 2022, 11:41 PM
Arlolra added a project: Parsoid.
Arlolra updated the task description. (Show Details)
Arlolra moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.

Change 751467 had a related patch set uploaded (by Arlolra; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] TableFixups: Minor perf tweaks and cleanup

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

Change 751467 merged by jenkins-bot:

[mediawiki/services/parsoid@master] TableFixups: Minor perf tweaks and cleanup

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

ssastry claimed this task.
ssastry subscribed.

Looks fixed at this time.

<table data-parsoid='{"dsr":[0,33,2,2]}'>
<tbody data-parsoid='{"dsr":[3,31,0,0]}'><tr data-parsoid='{"autoInsertedStart":true,"dsr":[3,30,0,0]}'><td data-parsoid='{"dsr":[3,30,1,0]}'><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]],"dsr":[4,26,null,null]}' data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"test &amp;#124; 123"}},"i":0}}]}'>test </span><span typeof="mw:Entity" about="#mwt1">|</span><span about="#mwt1"> 123</span> 456</td></tr>
</tbody></table>