Page MenuHomePhabricator

ExpandTemplates XML tree fails with only template argument
Open, Needs TriagePublic

Description

When viewing the XML parse tree in Special:ExpandTemplates, the results for optional template arguments are inconsistent.

  • Test{{{1|}}} produces <root>Test<tplarg><title>1</title><part><name index="1"/><value/></part></tplarg></root>, but
  • {{{1|}}} produces nothing at all.

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptOct 11 2019, 4:57 AM

Just to add a bit more info, It occurred to me to try the equivalent query in the API, and it works fine there, producing the expected:
<root><tplarg><title>1</title><part><name index=\"1\"/><value/></part></tplarg></root>.