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
- 平均合併
- 22 小時 52 分鐘
- 30 天內合併 PR
- 39
環境準備
這個專案沒有提供開發容器、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 於 8 天前認領。 未關閉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 天內回覆
-
False C# syntax errors and red squiggles when viewing pull request diffs可能已有人在做 @alexr00 今天認領。 未關閉info-needed
microsoft/vscode-pull-request-github#9034 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Enable "Open original file" for deleted files可能已有人在做 @alexr00 今天認領。 未關閉
microsoft/vscode-pull-request-github#9030 · 1 個 reaction · 已指派 2 人 ·
維護者通常 1 天內回覆
-
Copilot PR-state polling throws RangeError: Invalid array length while accumulating paginated results可能已有人在做 @alexr00 於 2 天前認領。 未關閉bug
microsoft/vscode-pull-request-github#9023 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 microsoft/vscode-pull-request-github 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 85/100
farbenmeer/tapi#531 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
naver/egjs-flicking#971 ·
-
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆
-
Tenant
難度 2/5 1-3 小時 新手友好度 66/100
MTES-MCT/Dossier-Facile-Frontend#2061 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
backnotprop/plannotator#1784 ·
維護者通常 1 天內回覆