Merge "Trim external link before validating"

This commit is contained in:
jenkins-bot 2015-07-25 21:56:04 +00:00 committed by Gerrit Code Review
commit 526d092df6

View file

@ -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() );
}
} );
};