提交 602155bb 编写于 作者: C Christof Marti 提交者: chrmarti

Avoid backticks (fixes #13098)

上级 c9682269
...@@ -521,12 +521,13 @@ export class ReportIssueAction extends Action { ...@@ -521,12 +521,13 @@ export class ReportIssueAction extends Action {
} }
private generateNewIssueUrl(baseUrl: string, name: string, version: string, commit: string, date: string, isPure: boolean, extensions:ILocalExtension[]): string { private generateNewIssueUrl(baseUrl: string, name: string, version: string, commit: string, date: string, isPure: boolean, extensions:ILocalExtension[]): string {
// Avoid backticks, these can trigger XSS detectors. (https://github.com/Microsoft/vscode/issues/13098)
const osVersion = `${os.type()} ${os.arch()} ${os.release()}`; const osVersion = `${os.type()} ${os.arch()} ${os.release()}`;
const queryStringPrefix = baseUrl.indexOf('?') === -1 ? '?' : '&'; const queryStringPrefix = baseUrl.indexOf('?') === -1 ? '?' : '&';
const body = encodeURIComponent( const body = encodeURIComponent(
`- VSCode Version: ${name} ${version}${isPure ? '' : ' **[Unsupported]**'} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'}) `- VSCode Version: ${name} ${version}${isPure ? '' : ' **[Unsupported]**'} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})
- OS Version: ${osVersion} - OS Version: ${osVersion}
- Extensions: ${extensions.map(e => '`' + e.id + '`').join(', ')} - Extensions: ${extensions.map(e => e.id).join(', ')}
Steps to Reproduce: Steps to Reproduce:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册