mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-26 09:45:54 +01:00
Use URLSearchParams
This commit is contained in:
@@ -447,10 +447,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
|
||||
params.purpose = options.purpose;
|
||||
}
|
||||
|
||||
const queryString = (Object.keys(params) as Array<keyof typeof params>)
|
||||
.map((key) => `${key}=${encodeURIComponent(params[key]!)}`)
|
||||
.join('&');
|
||||
|
||||
const queryString = new URLSearchParams(params).toString();
|
||||
this.element!.setAttribute('src', `${this.webviewContentEndpoint}/index.html?${queryString}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user