You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue links in overview HTML are emitted with an extra quote in href #9022
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:
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.
Activity