Repository: eza-community/eza (language: rust)

Issue:
bug: error render hyperlinks
If eza does something unexpected, or its output looks wrong, or it displays an error on the screen, or if it outright crashes, then please include the following information in your report:

- The version of eza being used (`eza --version`): v0.19.3
- The command-line arguments you are using: eza -l --hyperlink
- Your shell and terminal: fish shell, alacritty
- Your operating system and hardware platform: MacOS Darwin 23.3.0 x86_64 i386

If it’s a crash, please include the full text of the crash that gets printed to the screen. If you’re seeing unexpected behaviour, a screenshot of the issue will help a lot.

---

The / directory separator was incorrectly escaped as %2F, which prevented correct navigation to the file:
<img width="341" alt="image" src="https://github.com/user-attachments/assets/dd620970-7565-4869-977f-cf82e411ed49">

Correct: 
file:///Users/user/Downloads/pdf


Discussion / hints:
Is this related to https://github.com/eza-community/eza/pull/882?
yes, since `/` is not an english alpha.

Fix patch:
diff --git a/src/output/file_name.rs b/src/output/file_name.rs
index 3e7244fe9..ba8947bc0 100644
--- a/src/output/file_name.rs
+++ b/src/output/file_name.rs
@@ -402,7 +402,7 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
         &self,
         style_override: Option<Style>,
     ) -> Vec<ANSIString<'unused>> {
-        use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
+        use percent_encoding::{utf8_percent_encode, CONTROLS};
 
         const HYPERLINK_START: &str = "\x1B]8;;";
         const HYPERLINK_END: &str = "\x1B\x5C";
@@ -417,7 +417,7 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
                 .absolute_path()
                 .and_then(|p| p.as_os_str().to_str())
             {
-                let abs_path = utf8_percent_encode(abs_path, NON_ALPHANUMERIC).to_string();
+                let abs_path = utf8_percent_encode(abs_path, CONTROLS).to_string();
 
                 // On Windows, `std::fs::canonicalize` adds the Win32 File prefix, which we need to remove
                 #[cfg(target_os = "windows")]


Test patch: