Page MenuHomePhabricator

Parsoid ignores unclosed <ref>, whereas Cite extension truncates the page
Closed, DeclinedPublic

Description

An unclosed <ref> tag on the page eats up the rest of the page, typically including the requisite <reference> tag at the bottom of the page. However, VisualEditor handles the unclosed <ref> tag more gracefully, treating it as plain text.

At the URL above, the wikitext:

Before <ref> during
after
<references />

is rendered:

Before[1]
Cite error: <ref> tag found without <references/>

whereas VisualEditor shows:

Before <ref> during↵after
There are no references on this page to include on this list.

This issue was brought to my attention by an editor who somehow created the unclosed <ref> tag in VisualEditor. (See the initial revision of [[vi:Danh sách các chi tiết gợi nhớ đến Disney trong phim Enchanted]].) I’ve reached out to the editor for information on how they might’ve gotten into that state.


Version: unspecified
Severity: normal
URL: https://www.mediawiki.org/wiki/User:Mxn/56306

Details

Reference
bz56306

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:17 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz56306.

Never mind about that last part. It looks like they introduced the unclosed <ref> tag by hand, not using VisualEditor.

So is this a request for matching the more graceful behavior in the PHP Cite implementation, or is it a request for Parsoid to truncate the page as well?

I'm not sure; that depends what the more graceful behavior would be, but I would expect Parsoid to match Cite in any case. Does Parsoid's current behavior seem like a more reasonable way for Cite to handle unclosed <ref> tags?

Arlolra set Security to None.
ssastry claimed this task.

https://gerrit.wikimedia.org/r/#/c/255258/ fixes PHP parser behavior. Nothing to do in Parsoid land.