We can't escape it (and we can't deal with '|'), because users might
expect these to accept wikitext.
Bug: T119691
Change-Id: I10df9ebab408f531812b653b36ed35570311935e
* @return {string}
*/
ForeignStructuredUpload.prototype.getDescriptions = function () {
- var i, desc, templateCalls = [];
+ var i, desc, hasEquals, templateCalls = [];
for ( i = 0; i < this.descriptions.length; i++ ) {
desc = this.descriptions[ i ];
- templateCalls.push( '{{' + desc.language + '|' + desc.text + '}}' );
+ hasEquals = desc.text.indexOf( '=' ) !== -1;
+ templateCalls.push( '{{' + desc.language + ( hasEquals ? '|1=' : '|' ) + desc.text + '}}' );
}
return templateCalls.join( '\n' );