Merge "Use MediaWiki's new section edit summary if the user didn't modify it"

This commit is contained in:
jenkins-bot 2021-09-27 17:11:32 +00:00 committed by Gerrit Code Review
commit 118b958f8b

View file

@ -205,6 +205,13 @@ NewTopicController.prototype.getApiQuery = function ( comment, pageName, checkbo
dttags: tags.join( ',' ) dttags: tags.join( ',' )
} ); } );
// Allow MediaWiki to generate the summary if it wasn't modified by the user. This avoids
// inconsistencies in how wiki markup is stripped from section titles when they're used in
// automatic summaries. (T275178)
if ( data.summary === this.generateSummary( this.sectionTitle.getValue() ) ) {
delete data.summary;
}
return data; return data;
}; };