Issue links in overview HTML are emitted with an extra quote in href
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
- 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.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.6k
- Fork
- 800
- Merge trung bình
- 22 giờ 52 phút
- Pull request đã merge (30 ngày)
- 39
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-pull-request-github
-
PR overview remains stuck checking mergeability after an UNKNOWN responseCó thể đã có người làm @alexr00 đã nhận 8 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/vscode-pull-request-github#8953 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Issue 3 — DocumentationĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-pull-request-github#8792 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
False C# syntax errors and red squiggles when viewing pull request diffsCó thể đã có người làm @alexr00 đã nhận 1 ngày trước. Đang mởinfo-needed
microsoft/vscode-pull-request-github#9034 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enable "Open original file" for deleted filesCó thể đã có người làm @alexr00 đã nhận 1 ngày trước. Đang mở
microsoft/vscode-pull-request-github#9030 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Copilot PR-state polling throws RangeError: Invalid array length while accumulating paginated resultsCó thể đã có người làm @alexr00 đã nhận 2 ngày trước. Đang mởbug
microsoft/vscode-pull-request-github#9023 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/vscode-pull-request-github
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vectorize-io/hindsight#5457 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner friendly community contributions-welcome good first issue hacktoberfest help wanted testing up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
lukilabs/beautiful-mermaid#160 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
rescript-lang/rescript-lang.org#1420 ·
Maintainer thường phản hồi trong vòng 2 ngày