*/
( function ( $, mw ) {
+ var trimByteLength = require( 'mediawiki.String' ).trimByteLength;
+
/**
* Creates an mw.widgets.TitleInputWidget object.
*
// Parent method
value = mw.widgets.TitleInputWidget.parent.prototype.cleanUpValue.call( this, value );
- return $.trimByteLength( this.value, value, this.maxLength, function ( value ) {
- var title = widget.getTitle( value );
+ return trimByteLength( this.value, value, this.maxLength, function ( value ) {
+ var title = widget.getMWTitle( value );
return title ? title.getMain() : value;
} ).newVal;
};