mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-30 19:15:43 +00:00
Insert link: trim whitespace from the external link
Bug: T25499 Change-Id: I2392ade17d3d4428784c40dabf9ae5e216fbab47
This commit is contained in:
parent
2c3fe04ce1
commit
1514d166e0
|
@ -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