Last modified: 2013-07-11 16:43:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51739, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49739 - Parsoid uses nowiki tags for positional template parameters with '='s rather than just explicitly declaring them
Parsoid uses nowiki tags for positional template parameters with '='s rather ...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-18 08:45 UTC by Mr. Stradivarius
Modified: 2013-07-11 16:43 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mr. Stradivarius 2013-06-18 08:45:53 UTC
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
Comment 1 Mr. Stradivarius 2013-06-18 10:44:48 UTC
See also bug 49743.
Comment 2 James Forrester 2013-07-09 20:59:47 UTC
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}}.
Comment 3 Gerrit Notification Bot 2013-07-10 00:17:53 UTC
Change 72876 had a related patch set uploaded by GWicke:
Bug 49739: Use named parameter if value contains '='

https://gerrit.wikimedia.org/r/72876
Comment 4 Gerrit Notification Bot 2013-07-10 00:37:15 UTC
Change 72876 merged by jenkins-bot:
Bug 49739: Use named parameter if value contains '='

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links