Page MenuHomePhabricator

Templates with template name coming from expansion don't get data-mw target assigned
Closed, DuplicatePublic

Description

When a template name comes from a template expansion, the data-mw.parts.template.target.href isn't set:

$ echo "{{{{echo|echo}}|foo}}" | node parse
[…]
<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='…' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>

Compare to

$ echo "{{echo|foo}}" | node parse
[…]
<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='…' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>

Event Timeline

marcoil claimed this task.
marcoil raised the priority of this task from to Low.
marcoil updated the task description. (Show Details)
marcoil added a project: Parsoid.
marcoil added a subscriber: marcoil.