Parsoid uses nowiki tags for positional template parameters with '='s rather than just explicitly declaring them
Closed, ResolvedPublic

Description

If you explicitly declare positional parameters in a template, and then edit it with the Visual Editor, the Template Inspector converts it to implicitly declared positional parameters - i.e. {{some template|1= foo |2= bar }} becomes {{some template|foo|bar}}.

Now, if an explicit positional parameter contains an equals sign, then the Template Inspector puts nowiki tags around it. So {{some template|1= foo=bar |2= baz }} becomes {{some template|<nowiki>foo=bar</nowiki>|baz}}. However, "foo=bar" and "<nowiki>foo=bar</nowiki>" are not equivalent wikitext. For example, nowiki tags will break wikilinks.

There's an example of the difference in this diff:
https://www.mediawiki.org/w/index.php?title=VisualEditor:Template_test&diff=712906&oldid=712905

See the effects for the revisions before and after (look at the "Inline template" section).

Before: https://www.mediawiki.org/w/index.php?title=VisualEditor:Template_test&oldid=712905
After: https://www.mediawiki.org/w/index.php?title=VisualEditor:Template_test&oldid=712906


Version: unspecified
Severity: normal

Details

Reference
bz49739
bzimport set Reference to bz49739.

See also bug 49743.

This feels like a Parsoid bug, but I'm not sure? The user creating the equivalent of {{foo|1=foo|2=bar=foo}} should serialise to {{foo|foo|2=bar=foo}} instead of {{foo|foo|bar<nowiki>=</nowiki>foo}}.

Change 72876 had a related patch set uploaded by GWicke:
Bug 49739: Use named parameter if value contains '='

https://gerrit.wikimedia.org/r/72876

Change 72876 merged by jenkins-bot:
Bug 49739: Use named parameter if value contains '='

https://gerrit.wikimedia.org/r/72876

Add Comment