Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Strip leading/trailing whitespace from extension url #7052

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/extensibility/ExtensionManagerDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ define(function (require, exports, module) {
$dlg.find(".nav-tabs a:first").tab("show");
});

// Handle the install button.
// Handle the install button.
$(".extension-manager-dialog .install-from-url")
.click(function () {
InstallExtensionDialog.showDialog().done(ExtensionManager.updateFromDownload);
Expand Down
8 changes: 4 additions & 4 deletions src/extensibility/InstallExtensionDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ define(function (require, exports, module) {
break;

case STATE_INSTALLING:
url = this.$url.val();
url = this.$url.val().trim();
this.$inputArea.hide();
this.$browseExtensionsButton.hide();
this.$msg.text(StringUtils.format(Strings.INSTALLING_FROM, url))
Expand Down Expand Up @@ -297,9 +297,9 @@ define(function (require, exports, module) {
* @private
* Handle typing in the URL field.
*/
InstallExtensionDialog.prototype._handleUrlInput = function () {
var url = this.$url.val(),
valid = (url !== "");
InstallExtensionDialog.prototype._handleUrlInput = function (e) {
var url = this.$url.val().trim(),
valid = (url !== "");
if (!valid && this._state === STATE_VALID_URL) {
this._enterState(STATE_START);
} else if (valid && this._state === STATE_START) {
Expand Down