mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Update VE core submodule to master (e8c6f7d)
New changes: b44ef6d [BREAKING CHANGE] Fix WhitespacePreservingTextInputWidget API 96e4034 Localisation updates from https://translatewiki.net. Local changes: * Use new WhitespacePreservingTextInputWidget API Change-Id: I9920a3b5c8c3e8a241dcfdd1bde20f4ea1cf78b6
This commit is contained in:
parent
5dbe119699
commit
0e30e328ba
2
lib/ve
2
lib/ve
|
@ -1 +1 @@
|
|||
Subproject commit 5b07e0ccb402bfe4d4461cd4ae9f6094eb228ed0
|
||||
Subproject commit e8c6f7dc98a57453f2293421145cf51697893745
|
|
@ -115,7 +115,7 @@ ve.ui.MWExtensionWindow.prototype.getTeardownProcess = function ( data, process
|
|||
ve.ui.MWExtensionWindow.prototype.getActionProcess = function ( action, process ) {
|
||||
return process.first( function () {
|
||||
if ( action === 'done' ) {
|
||||
if ( this.constructor.static.allowedEmpty || this.input.getInnerValue() !== '' ) {
|
||||
if ( this.constructor.static.allowedEmpty || this.input.getValue() !== '' ) {
|
||||
this.insertOrUpdateNode();
|
||||
} else if ( this.selectedNode && !this.constructor.static.allowedEmpty ) {
|
||||
// Content has been emptied on a node which isn't allowed to
|
||||
|
@ -191,12 +191,12 @@ ve.ui.MWExtensionWindow.prototype.removeNode = function () {
|
|||
*/
|
||||
ve.ui.MWExtensionWindow.prototype.updateMwData = function ( mwData ) {
|
||||
var tagName = mwData.name,
|
||||
value = this.input.getValue();
|
||||
value = this.input.getValueAndWhitespace();
|
||||
|
||||
// XML-like tags in wikitext are not actually XML and don't expect their contents to be escaped.
|
||||
// This means that it is not possible for a tag '<foo>…</foo>' to contain the string '</foo>'.
|
||||
// Prevent that by escaping the first angle bracket '<' to '<'. (bug 57429)
|
||||
value = value.replace( new RegExp( '<(/' + tagName + '\\s*>)', 'gi' ), '<$1' );
|
||||
|
||||
mwData.body.extsrc = this.whitespace[ 0 ] + value + this.whitespace[ 1 ];
|
||||
mwData.body.extsrc = value;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue