Commit Graph
4 Commits
Author SHA1 Message Date
dualfroz 128a5c945a fix: percent-encode page URLs built from file paths
A file named Müsli.html was indexed with the URL /Müsli.html, which only
resolves if the host happens to serve the same byte sequence the index was
built from. Encode the URL that build_url derives from the file path using
the URL spec's path percent-encode set, leaving / and % alone so path
separators and already-encoded filenames are unaffected.

URLs supplied by the caller (data-pagefind-meta="url:...", addCustomRecord)
do not go through build_url and are untouched.

Fixes #619
2026-09-13 15:40:22 +02:00
upstream 3d8f53f964 Upstream Pagefind/pagefind state of the touched files before dfc8664a11 2026-09-11 23:07:10 +02:00
dualfroz 49fb9b1b9b fix: percent-encode page URLs built from file paths
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
2026-09-23 06:22:15 +02:00
upstream 996b9c3416 Upstream Pagefind/pagefind state of the touched files before 0259c44155 2026-09-11 23:07:10 +02:00