Merge "Insert link: trim whitespace from the external link"

This commit is contained in:
jenkins-bot 2015-03-16 10:59:28 +00:00 committed by Gerrit Code Review
commit 49524147a8

View file

@ -471,6 +471,7 @@ $.wikiEditor.modules.dialogs.config = {
else
insertText = '[[' + target + '|' + escapeInternalText( text ) + ']]';
} else {
target = $.trim( target );
// Prepend http:// if there is no protocol
if ( !target.match( /^[a-z]+:\/\/./ ) )
target = 'http://' + target;