Don't die if the user tries to nest a <ref> inside another one
Open, NormalPublic1 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.

Juandev created this task.Dec 17 2016, 12:33 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 17 2016, 12:33 PM
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 added a subscriber: Jdforrester-WMF.

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 Normal priority.
Jdforrester-WMF added a project: Cite.
Jdforrester-WMF set the point value for this task to 1.
Izno moved this task from Unsorted backlog to External on the Cite board.Feb 25 2017, 9:12 PM
DLynch added a subscriber: DLynch.Mar 29 2017, 3:24 PM

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
Previews as
Renders as

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