Last modified: 2014-06-03 19:52:07 UTC
Test case: {{Rellink|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}} We don't render this the same way as the PHP parser does. On round-trip, the pipe after {{FULLPAGENAME}} is then entity-encoded.
It is a escapeTplArg issue.
(In reply to ssastry from comment #1) > It is a escapeTplArg issue. Our HTML also looks very different. The PHP parser produces a link, while we are emitting a span without content.
Ok, two bugs for the price of one then. :-) I was eating lunch and didn't read the description carefully.
Change 135944 had a related patch set uploaded by Arlolra: Fix entity encoding pipe in nested tpl args https://gerrit.wikimedia.org/r/135944
Oh, there's more bug here ... hmm.
(In reply to Gabriel Wicke from comment #2) > (In reply to ssastry from comment #1) > > It is a escapeTplArg issue. > > Our HTML also looks very different. The PHP parser produces a link, while we > are emitting a span without content. I think our HTML is ok. The span you're seeing is, <span>Warning: Page/template fetching disabled, and no cache for Template:Rellink</span> Try it with prefix enwiki.
Change 135944 merged by jenkins-bot: Fix entity encoding pipe in nested tpl args https://gerrit.wikimedia.org/r/135944
(In reply to Arlo Breault from comment #6) > (In reply to Gabriel Wicke from comment #2) > > (In reply to ssastry from comment #1) > > > It is a escapeTplArg issue. > > > > Our HTML also looks very different. The PHP parser produces a link, while we > > are emitting a span without content. > > I think our HTML is ok. The span you're seeing is, > > <span>Warning: Page/template fetching disabled, and no cache for > Template:Rellink</span> > > Try it with prefix enwiki. I used parse.js, which defaults to prefix enwiki. I'm pretty sure I didn't see that message, but could be wrong. In any case, great that it's working now.
For the record, here is our output: [subbu@earth lib] echo "{{Rellink|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}" | node parse ... <div class="hatnote" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Rellink","href":"./Template:Rellink"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}' data-parsoid='{"stx":"html","dsr":[0,58,null,null],"pi":[[{"k":"1","spc":["","","",""]}]]}'><a rel="mw:ExtLink" href="//en.wikipedia.org/w/index.php?title=Main_Page&action=edit" data-parsoid='{"targetOff":81,"contentOffsets":[81,84],"a":{"href":"//en.wikipedia.org/w/index.php?title=Main_Page&action=edit"},"sa":{"href":"{FULLPAGENAME}}|action=edit}} bar]}}\n"}}'>bar</a></div> Here is PHP parser output: <div class="hatnote"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=edit">bar</a></div>