TheDJ has uploaded a new change for review.
https://gerrit.wikimedia.org/r/196966
Change subject: Insert link: trim whitespace from the external link
......................................................................
Insert link: trim whitespace from the external link
Bug: T25499
Change-Id: I2392ade17d3d4428784c40dabf9ae5e216fbab47
---
M modules/jquery.wikiEditor.dialogs.config.js
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor
refs/changes/66/196966/1
diff --git a/modules/jquery.wikiEditor.dialogs.config.js
b/modules/jquery.wikiEditor.dialogs.config.js
index 7b54353..ac2be49 100644
--- a/modules/jquery.wikiEditor.dialogs.config.js
+++ b/modules/jquery.wikiEditor.dialogs.config.js
@@ -471,6 +471,7 @@
else
insertText = '[[' + target + '|' + escapeInternalText( text ) + ']]';
} else {
+ target =
$.trim( target );
// Prepend
http:// if there is no protocol
if (
!target.match( /^[a-z]+:\/\/./ ) )
target
= 'http://' + target;
--
To view, visit https://gerrit.wikimedia.org/r/196966
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2392ade17d3d4428784c40dabf9ae5e216fbab47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits