Skip to content

Commit

Permalink
patched view data source uri passing and loadView()
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomFractals committed Aug 19, 2019
1 parent 7c2c733 commit 0530b85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/data.preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ export class DataPreview {
private loadView(viewName: string, url: string): void {
const fileUri: Uri = Uri.parse(url);
try {
this._logger.debug(`loadView(): loading view... \n ${viewName}`, fileUri.toString(true)); // skip encoding
this._logger.debug(`loadView(): loading view... \n ${viewName}`, url);
//fileUri.toString(true)); // skip encoding
if (url.startsWith('http://') || url.startsWith('https://')) {
// launch requested remote data view command
this._logger.debug(`loadView():executeCommand: \n ${viewName}`, url);
Expand Down
4 changes: 2 additions & 2 deletions templates/data.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Security-Policy"
content="default-src * vscode-resource: https: 'unsafe-inline' 'unsafe-eval';
script-src vscode-resource: blob: https: 'unsafe-inline' 'unsafe-eval';
script-src vscode-resource: blob: data: https: 'unsafe-inline' 'unsafe-eval';
style-src vscode-resource: https: 'unsafe-inline';
img-src vscode-resource: data: https:;
connect-src vscode-resource: blob: data: https: http:;">
Expand Down Expand Up @@ -242,7 +242,7 @@
vscode.postMessage({
command: 'loadView',
viewName: 'vscode.open',
uri: `file:///${dataUrl}`
uri: `${dataUrl}`
});
}

Expand Down

0 comments on commit 0530b85

Please sign in to comment.