提交 1e4e1724 编写于 作者: M Michel Kaporin 提交者: Benjamin Pasero

Added missing URI encoding before length check. Fixes #21737. (#23847)

上级 0b6afcab
...@@ -730,17 +730,18 @@ Steps to Reproduce: ...@@ -730,17 +730,18 @@ Steps to Reproduce:
return `|${e.manifest.name}|${e.manifest.publisher}|${e.manifest.version}|`; return `|${e.manifest.name}|${e.manifest.publisher}|${e.manifest.version}|`;
}).join('\n'); }).join('\n');
// 2000 chars is browsers de-facto limit for URLs, 250 chars is allowed for other string parts of the issue URL const extensionTable = `
// http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
if (tableHeader.length + table.length > 1750) {
return 'the listing exceeds the lower minimum of browsers\' URL characters limit';
}
return `
${tableHeader}\n${table}; ${tableHeader}\n${table};
`; `;
// 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL
// http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
if (encodeURIComponent(extensionTable).length > 1600) {
return 'the listing exceeds the lower minimum of browsers\' URL characters limit';
}
return extensionTable;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册