Issue links in overview HTML are emitted with an extra quote in href
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
- Extension version: 0.166.1 (current
mainpackage.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.
- 主要语言
- TypeScript
- 星标
- 2.6k
- 派生
- 800
- 平均合并
- 20 小时 52 分钟
- 30 天内合并 PR
- 35
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-pull-request-github 的其他 Issue
-
PR overview remains stuck checking mergeability after an UNKNOWN response可能已有人在做 @alexr00 于 7 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/vscode-pull-request-github#8953 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/vscode-pull-request-github#8792 ·
维护者通常 1 天内回复
-
Copilot PR-state polling throws RangeError: Invalid array length while accumulating paginated results可能已有人在做 @alexr00 于 1 天前认领。 未关闭
microsoft/vscode-pull-request-github#9023 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Stacked PRs: PR state does not change in stack unless you manually change the webview可能已有人在做 @alexr00 于 2 天前认领。 未关闭bug
microsoft/vscode-pull-request-github#9020 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Colours are off for sub-buttons under Create Merge Commit可能已有人在做 @alexr00 于 2 天前认领。 未关闭bug
microsoft/vscode-pull-request-github#9019 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 microsoft/vscode-pull-request-github 的全部 Issue
相似的 Issue
-
refactor
难度 2/5 1-3 小时 新手友好度 76/100
tomnewport/memprot-topo#55 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
WalletConnect/walletconnect-monorepo#7368 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
BU-Spark/se-chem-apll#47 ·
-
documentation
难度 2/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 70/100
udistrital/paginaweb_root#23 ·