Merge "MWLinkTargetInputWidget: Check title is valid in MediaWiki"

This commit is contained in:
jenkins-bot 2015-01-31 03:13:36 +00:00 committed by Gerrit Code Review
commit 73e05df441

View file

@ -97,7 +97,7 @@ ve.ui.MWLinkTargetInputWidget.prototype.isValid = function () {
valid = this.annotation.getAttribute( 'href' )
.match( /(^|\s)((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi );
} else {
valid = !!this.getValue();
valid = !!mw.Title.newFromText( this.getValue() );
}
return $.Deferred().resolve( valid ).promise();
};