mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-28 18:21:02 +00:00
Merge "Insert link: trim whitespace from the external link"
This commit is contained in:
commit
49524147a8
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue