Files
egui/crates
禾可andEmil Ernerfeldt e19e45cd2f egui_extras: percent-decode file:// URIs in the file loader (#8342)
`FileLoader` strips the `file://` prefix but does not percent-decode the
path,
so a `file://` URI with an escape such as `%20` fails to resolve on disk
(the
function's own doc noted "percent un-encoding are not handled").

`convert_uri_to_path` now decodes `%XX` escapes (e.g. `%20` -> space)
after
stripping the scheme, using a small inline decoder so no dependency is
added.
Invalid or truncated escapes are left as-is, and UTF-8 multibyte
sequences round
-trip. Added `%20` cases to the existing `check_convert_uri_to_path`
test for
both the Windows and non-Windows paths.

`cargo test`, `clippy`, and `fmt` pass for `egui_extras`.

Closes #8288

---------

Signed-off-by: 林晨 (Leo Cheng) <leo-cheng@vip.qq.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-10-06 07:31:27 +00:00
..
2026-09-08 15:29:48 +00:00