- Extension version: 0.166.1 (current
main package.json)
- VSCode Version: not applicable to the source-level reproduction; the extension declares
^1.141.0
- OS: Windows 11 (source-level reproduction; the generated HTML is platform-independent)
- Repository Clone Configuration (single repository/fork of an upstream repository): single repository
- GitHub Product (GitHub.com/GitHub Enterprise version x.x.x): GitHub.com
Steps to Reproduce:
- Open a pull request or issue whose description contains a link to another issue in the same repository, for example
https://github.com/microsoft/vscode-pull-request-github/issues/123.
- Let the extension convert the description HTML for the issue/PR overview.
- Inspect the generated anchor for the issue link.
The issue-link branch in src/github/utils.ts currently returns:
return `href="${(await toOpenIssueWebviewUri(...)).toString()}""`;
That produces an anchor like:
<a href="vscode://github.vscode-pull-request-github/open-issue-webview?..."">#123</a>
The corresponding pull-request branch returns a normally terminated href, so this only affects links converted from /issues/<number> URLs.
The extra quote is parsed as a second, nameless attribute (rather than being part of the href value). The link may still appear to work in some Chromium versions, but the HTML is malformed and can be handled inconsistently by the webview DOM/sanitizer. It also makes the generated markup different from the PR-link path for no functional reason.
The smallest fix appears to be removing the extra " at the end of the issue branch, and adding a regression test around the HTML returned for a same-repository issue link. I have not changed the repository code yet; this report is based on the current main source and a local HTML parsing reproduction.
mainpackage.json)^1.141.0Steps to Reproduce:
https://github.com/microsoft/vscode-pull-request-github/issues/123.The issue-link branch in
src/github/utils.tscurrently returns:That produces an anchor like:
The corresponding pull-request branch returns a normally terminated
href, so this only affects links converted from/issues/<number>URLs.The extra quote is parsed as a second, nameless attribute (rather than being part of the
hrefvalue). The link may still appear to work in some Chromium versions, but the HTML is malformed and can be handled inconsistently by the webview DOM/sanitizer. It also makes the generated markup different from the PR-link path for no functional reason.The smallest fix appears to be removing the extra
"at the end of the issue branch, and adding a regression test around the HTML returned for a same-repository issue link. I have not changed the repository code yet; this report is based on the currentmainsource and a local HTML parsing reproduction.