Skip to content

Commit

Permalink
Fix loading of images with spaces in the name
Browse files Browse the repository at this point in the history
Partially revert microsoft#84667

Also seems to fix microsoft#85190
  • Loading branch information
mjbvz committed Nov 20, 2019
1 parent 8eaf2a3 commit 8caf39e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/image-preview/src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ class Preview extends Disposable implements vscode.WebviewEditorEditingCapabilit
default:
// Avoid adding cache busting if there is already a query string
if (resource.query) {
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString());
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString(true));
}
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString() + `?version=${version}`);
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString(true) + `?version=${version}`);
}
}

Expand Down

0 comments on commit 8caf39e

Please sign in to comment.