Commit bd5ca9a
fix(docs): URL-encode owner/repo before hitting the GitHub API in star-history (#534)
fetchStarTimestamps() interpolated owner/repo straight into the
stargazers request URL with no encoding. parseRepos() takes raw
user-typed text, so a repo string containing a space, &, #, or other
URL-significant character (a stray character when pasting, or a
free-form "owner/repo name" typo) silently broke the query string or
truncated the path instead of producing a clean request or a readable
404.
Wrap both segments in encodeURIComponent(). Verified normal repo
names (e.g. cobusgreyling/loop-engineering) produce an identical URL,
and a name with a space and an ampersand now encodes cleanly instead
of corrupting the query string.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent bce5933 commit bd5ca9a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
0 commit comments