mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-12-01 11:27:26 +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