Skip to content

Commit

Permalink
fixes #66628
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Feb 20, 2019
1 parent 3199f1f commit 85ebf1e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,15 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler {
}

if (!confirmed) {
let uriString = uri.toString();

if (uriString.length > 40) {
uriString = `${uriString.substring(0, 30)}...${uriString.substring(uriString.length - 5)}`;
}

const result = await this.dialogService.confirm({
message: localize('confirmUrl', "Allow an extension to open this URL?", extensionId),
detail: `${extension.displayName || extension.name} (${extensionId}) wants to open a URL:\n\n${uri.toString()}`,
detail: `${extension.displayName || extension.name} (${extensionId}) wants to open a URL:\n\n${uriString}`,
primaryButton: localize('open', "&&Open"),
type: 'question'
});
Expand Down

0 comments on commit 85ebf1e

Please sign in to comment.