Page MenuHomePhabricator

Parsoid's Cite implementation's HTML -> WT handler should discard <ref> tags if they have no content
Open, MediumPublic0 Estimated Story Points

Description

This is a mess: https://en.wikipedia.org/w/index.php?title=Abbas_ibn_Firnas&diff=710523708&oldid=707794731

The biggest problem is that it inserts <ref /> at the very start of the page, on the same line as the infobox.

Event Timeline

Do we know what the user did. If they wrapped the whole lede in a heading it's not surprising everything got corrupted...

Jdforrester-WMF renamed this task from Empty <ref /> tag added at the start of the page, broke the infobox to Parsoid serialises `<ref>\w</ref>` to a <ref /> tag (rather than discarding), which then breaks the page.Apr 12 2016, 7:27 PM
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF set the point value for this task to 0.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

Change 450985 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Enable extensions to distinguish between <ext /> and <ext></ext>

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

Change 450985 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Enable extensions to distinguish between <ext /> and <ext></ext>

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

ssastry claimed this task.
Arlolra subscribed.

I don't think this is resolved since it's asking for Parsoid to drop empty unnamed references. It's still reproducible with the above steps.

The title is kind of misleading in that VE is sending these back without a body in data-mw, so it isn't really about the distinction in that patch (Sorry).

ssastry renamed this task from Parsoid serialises `<ref>\w</ref>` to a <ref /> tag (rather than discarding), which then breaks the page to Parsoid's Cite implementation's HTML -> WT handler should discard <ref> tags if they have no content.Mar 8 2020, 10:43 PM
ssastry moved this task from html2wt to Missing Functionality on the Parsoid board.
ssastry subscribed.
Izno moved this task from Unsorted backlog to External on the Cite board.