mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Merge "Trim external link before validating"
This commit is contained in:
commit
526d092df6
|
@ -55,6 +55,8 @@ ve.ui.MWExternalLinkAnnotationWidget.static.getAnnotationFromText = function ( v
|
|||
ve.ui.MWExternalLinkAnnotationWidget.prototype.createInputWidget = function () {
|
||||
return new OO.ui.TextInputWidget( {
|
||||
icon: 'linkExternal',
|
||||
validate: ve.init.platform.getExternalLinkUrlProtocolsRegExp()
|
||||
validate: function ( text ) {
|
||||
return !!ve.init.platform.getExternalLinkUrlProtocolsRegExp().exec( text.trim() );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue