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 created this task.Feb 2 2015, 4:20 PM
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.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 2 2015, 4:20 PM
marcoil removed marcoil as the assignee of this task.Jun 9 2015, 2:08 PM