Page MenuHomePhabricator

Don't die if the user tries to nest a <ref> inside another one
Open, LowestPublic1 Estimated Story Points

Description

I have just figured out that VE at cs.wp freeze with the intent to include ref tags into other ref tags. This is sometimes needed, when you have notes under article and you need to reference some information for the notes. Normally you would add ref tags into {{#tag:ref...|group="$"}}, because otherwise it wont work and in preview you would see worning. But when doing this via VE it freezes and you lost all of your previous work.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

And vice versa, VE doesnt see/read notes which are in {{#tag:ref...|group="$"}}.

Jdforrester-WMF subscribed.

The {{#tag:ref hack isn't supported, and is the cause of much sadness and upset. :-( We're certainly not going to have VE actively create more such wikitext, but we shouldn't crash on user input either. :-)

Jdforrester-WMF renamed this task from If <ref></ref> includes another ref tag, replace cover ref tags by {{#tag:ref...|group="$"}} to Don't die if the user tries to nest a <ref> inside another one.Feb 21 2017, 8:27 PM
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF added a project: Cite.
Jdforrester-WMF set the point value for this task to 1.

I can't reproduce an outright freeze. Could you give some more precise steps you took?

I did note that trying to write {{#tag makes the VE template dialog error out, but it's in a reversible way -- I could cancel back out of it and keep making changes. Editing a page whose wikitext I had manually constructed to contain nested refs didn't show any problems.

As an aside, I noticed a preview-different-from-render thing when building my testcase for this:

Wikitext
pasted_file (172×1 px, 24 KB)
Previews as
pasted_file (218×382 px, 11 KB)
Renders as
pasted_file (222×420 px, 16 KB)

...losing the display of the second ref in the actual page-output.

Deskana lowered the priority of this task from Medium to Lowest.Aug 27 2018, 1:27 PM
Deskana moved this task from TR0: Interrupt to Freezer on the VisualEditor board.