49fb9b1b9b29c78462f1740971ad13bd8904181c
build_url() escaped %, # and ? one by one, so a file name carrying any other character that a URL path cannot hold - a space, a quote, an angle bracket, a control character - was emitted raw and only resolved if the host happened to serve the same byte sequence the index was built from. Encode the URL that build_url derives from the file path with the URL spec's path percent-encode set, leaving / alone so the separators between path segments survive. % stays in the set, so a file literally named in encoded form keeps pointing at the file that is on disk. URLs supplied by the caller (data-pagefind-meta="url:...", addCustomRecord) do not go through build_url and are untouched. Fixes #619
Description
My contributions to Pagefind/pagefind: 10 commits, 1 merged PRs
146 KiB
0 Stars
1 Watchers
0 Forks
Languages
Rust
62.4%
TypeScript
17.3%
Python
8%
Svelte
6.9%
JavaScript
5.4%