Page MenuHomePhabricator

Parsoid treats invalid titles in <gallery> differently to legacy parser
Closed, ResolvedPublic


If the title is invalid, for example contains two colons:


Parsoid will output an item as if the image were missing:

Legacy parser will drop the item completely:

Event Timeline

Esanders created this task.Aug 17 2020, 6:06 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 17 2020, 6:06 PM
ssastry triaged this task as Low priority.Aug 17 2020, 6:11 PM
ssastry added a project: Parsoid-Rendering.
ssastry moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.

Parsoid and the legacy parser have the same check in the gallery,

And the test "Gallery" has an example like,


where the line gets dropped for being an invalid title.

The problem here is specific to Parsoid's Title class. The same problem occurs with wikilink syntax,


should render as plaintext but Parsoid produces a figure with a missing image.

Arlolra claimed this task.Aug 25 2020, 9:40 PM

Change 622432 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Title with leading colon is invalid

Change 622432 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Title with leading colon is invalid

Arlolra closed this task as Resolved.Aug 25 2020, 11:03 PM

Change 625641 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a8

Change 625641 merged by jenkins-bot:
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a8