When extensions use the <tag>..</tag> syntax, Parsoid doesn't currently support accessing frame arguments {{{1}}}, etc. when the extension tag shows up in a template. This is because, Parsoid expands arguments with the legacy preprocessor and when processing the template, the extension content isn't processed by default.
With the legacy parser, extensions can use the Parser API method to effectively signal that the content is wikitext and lets them access template arguments from the current frame.
Instead of adding special extension preprocessing / argument expansion support to Parsoid to support this use case, Parsoid developers recommend using the {{#tag:...|...}} parser function that processes its arguments eagerly within the template frame context. With the tag parser function use, they effectively get access to {{{..}}} args in the current frame.
The original bug report has now been repurposed to add a new Linter category to flag <tag>..</tag> uses that access frame arguments so that we can replace the xml-syntax invocation with the parser-function-syntax invocation.
We have already fixed a number of these invocations (including the PTag template on mediawiki.org) at this point to address this.
- Acceptance Criteria
- Add this to the "Instructions for Editor" documentation
- ...
Original bug report
Steps to replicate the issue (include links if applicable):
Open https://www.mediawiki.org/wiki/Parsoid?useparsoid=1.
Look at the Phab page indicator.
What happens?:
It displays
Issue tracker: [[phab:tag/{{{1}}}/|#{{{1}}}]]What should have happened instead?:
It should display
Issue tracker: #parsoid
with a link to the phab tag.
Other information (browser name/version, screenshots, etc.):
The fact that the issue stems from the PTag template rendering can be seen here: https://www.mediawiki.org/wiki/Template:Ptag?useparsoid=1
The issue is also visible on enwikivoyage, where all the uses of the Geo template (displaying a map next to the "Rendered with Parsoid" indicator) display a map centered on 0, 0. (see for instance https://en.wikivoyage.org/wiki/Zurich)
