Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Issue links in overview HTML are emitted with an extra quote in href

未关闭
#9,022 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@alexr00 已经在做这个了。

开始于 2026年10月6日。

  • #9025 来自 @strawberry-little-bear —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

  • 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:

  1. 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.
  2. Let the extension convert the description HTML for the issue/PR overview.
  3. 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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-pull-request-github 的其他 Issue

查看 microsoft/vscode-pull-request-github 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。