mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Section editing: strip links from heading text used for edit summary
Stops us including "[edit]" in the summary when people have marked whole headings for translation. Bug: T160911 Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
This commit is contained in:
parent
1adedfbd8b
commit
1dc18b6703
|
@ -2028,7 +2028,9 @@ ve.init.mw.ArticleTarget.prototype.restoreEditSection = function () {
|
|||
headingNode = $section.data( 'view' );
|
||||
|
||||
if ( $section.length && new mw.Uri().query.summary === undefined ) {
|
||||
headingText = $section.text();
|
||||
// Due to interactions with Translate, strip out mw-
|
||||
// editsection from the heading.
|
||||
headingText = $section.clone().find( 'span.mw-editsection' ).remove().end().text();
|
||||
}
|
||||
|
||||
if ( headingNode ) {
|
||||
|
|
Loading…
Reference in a new issue