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

bzimport added a project: Parsoid-Serializer.Via ConduitNov 22 2014, 2:01 AM
bzimport set Reference to bz49739.
MrStradivarius created this task.Via LegacyJun 18 2013, 8:45 AM
MrStradivarius added a comment.Via ConduitJun 18 2013, 10:44 AM

See also bug 49743.

Jdforrester-WMF added a comment.Via ConduitJul 9 2013, 8:59 PM

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}}.

gerritbot added a comment.Via ConduitJul 10 2013, 12:17 AM

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

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

gerritbot added a comment.Via ConduitJul 10 2013, 12:37 AM

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

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.