Page MenuHomePhabricator

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


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:

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


Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:01 AM
bzimport set Reference to bz49739.

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 '='

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