Page MenuHomePhabricator

Special:ExpandTemplates cannot display nested references with #tag:ref
Open, Needs TriagePublic


This code works in a wiki page, e.g.

Statement.{{#tag:ref|Note for statement.<ref>Reference for note.</ref>|group=note}}
== Notes ==
<references group="note" />
== References ==
<references /> says the result is:

Statement.<ref group="note">Note for statement.<ref>Reference for note.</ref></ref>
== Notes ==
<references group="note" />
== References ==
<references />

The preview on Special:ExpandTemplates then fails with:
"A <ref> tag is missing the closing </ref> (see the help page)"

The message is (customized at enwiki).
If the result from ExpandTemplates with <ref... instead of {{#tag:ref... is copied to a wiki page then it pruduces the same error message. The problem is apparently that Expandtemplates tries to display a version where #tag:ref has been converted to <ref>. I guess this could also affect other uses of #tag. If it's difficult to change then maybe it should just be mentioned clearly in It currently says:

"In addition there is a preview area. However, this shows the rendered result of expanding the expanded wikitext again (T30616). Although the result is usually the same as after single expansion, it can be different if the first expansion produces braces."