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 還沒有評估資料。

描述

bug
  • 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
平均合併
22 小時 52 分鐘
30 天內合併 PR
39

環境準備

這個專案沒有提供開發容器、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 摘要。