Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c15d07b
fix(ui): decode reserved characters in local markdown paths
KennyMcSimpson Oct 8, 2026
ebc3579
build(ui): regenerate assets for encoded Markdown filenames
KennyMcSimpson Oct 8, 2026
744a153
fix(ui): decode Markdown file targets only at the resolver
KennyMcSimpson Oct 9, 2026
cb8b657
Merge main and fix remaining chat file links
KennyMcSimpson Oct 10, 2026
e418909
Merge main and rebuild UI bundle
KennyMcSimpson Oct 10, 2026
fdf9f23
Merge main and regenerate embedded UI for file link fix
KennyMcSimpson Oct 13, 2026
be46c10
Merge main and regenerate UI assets for encoded Markdown links
KennyMcSimpson Oct 14, 2026
7a14973
Regenerate UI assets for current main and encoded Markdown links
KennyMcSimpson Oct 22, 2026
7bcc9fe
Merge upstream main and resolve Markdown regression conflicts
KennyMcSimpson Oct 22, 2026
4da4a34
Regenerate UI assets for Markdown filename decoding
KennyMcSimpson Oct 23, 2026
f3e4fc9
Merge upstream main and preserve encoded Markdown filenames
KennyMcSimpson Oct 23, 2026
d8eb14f
Merge upstream main and rebuild UI bundle
KennyMcSimpson Oct 24, 2026
a201272
Merge upstream main and resolve generated UI removal
KennyMcSimpson Oct 28, 2026
a33eca7
test(ui): keep filename decoding coverage focused
KennyMcSimpson Oct 28, 2026
95c3d55
Merge branch 'main' into fix/markdown-encoded-filenames
alphaxiv-bot[bot] Oct 28, 2026
1a773d8
Merge branch 'main' into fix/markdown-encoded-filenames
alphaxiv-bot[bot] Oct 28, 2026
b923f69
Merge branch 'main' into fix/markdown-encoded-filenames
alphaxiv-bot[bot] Oct 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/src/markdownTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function citedFilePath(path: string, resolveFilePath?: (path: string) =>
if (native || /^file:/i.test(path)) return native;
if (resolveFilePath) return resolveFilePath(path);
try {
const decoded = decodeURI(path);
const decoded = decodeURIComponent(path);
return decoded.includes("\0") ? null : decoded;
} catch {
return null;
Expand Down
14 changes: 14 additions & 0 deletions ui/tests/markdownTarget.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ test("re-resolved markdown paths are decoded only once", () => {
assert.equal(docLink(encodeMarkdownPath(figure.path)), "docs/figures/chart#1.png");
});

test("chat file links decode reserved filename characters without a resolver", () => {
for (const [target, filename] of [
["chart%231.png", "chart#1.png"],
["chart%3F1.png", "chart?1.png"],
["chart%26draft.png", "chart&draft.png"],
["chart%3A42.py", "chart:42.py"],
["chart%25231.png", "chart%231.png"],
]) {
assert.equal(citedFilePath(target), filename);
}
assert.equal(citedFilePath("bad%escape.png"), null);
assert.equal(citedFilePath("%00.png"), null);
});

test("document assets resolve relative to the decoded document path once", () => {
const asset = (path, src) => documentAssetTarget(path, src, true);
assert.deepEqual(asset("my figs/plot.html", "chart%231.png#x"), { path: "my figs/chart#1.png", query: "", hash: "#x" });
Expand Down
Loading