mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
"Open in Slicer" emitted `orcaslicer://open?file=<URL>` and `bambustudio://open?file=<URL>` by plain string concatenation, relying on a stale comment that claimed the browser preserves URLs in the query string. That ignores the slicer's own `url_decode()` on the received query (BS post_init → url_decode + split_str; OrcaSlicer Downloader regex + url_decode), so any already-percent-encoded character — most commonly `%20` from filenames with spaces — decoded to a literal space and the slicer's subsequent HTTP GET returned 0 bytes or 404. All three URL forms now use `encodeURIComponent()` (matching what the macOS `bambustudioopen://` branch was already doing, which is why the bug didn't surface on macOS). Corrected the file-level comment to document the actual invariant. Regression test in slicer.test.ts feeds the exact issue reproduction URL and asserts `%2520` appears in the generated href.