Skip to content

Commit

Permalink
Merge pull request #1191 from d-air1/encode-quotes-in-directory-path
Browse files Browse the repository at this point in the history
Encode single quote in directory path name
  • Loading branch information
svenstaro authored Aug 3, 2023
2 parents 46f3c13 + 77e9449 commit 5d252d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,10 @@ fn wget_footer(abs_path: &Uri, root_dir_name: Option<&str>, current_user: Option
None => String::new(),
};

let command =
format!("wget -rcnHp -R 'index.html*'{cut_dirs}{user_params} '{abs_path}?raw=true'");
let encoded_abs_path = abs_path.to_string().replace('\'', "%27");
let command = format!(
"wget -rcnHp -R 'index.html*'{cut_dirs}{user_params} '{encoded_abs_path}?raw=true'"
);
let click_to_copy = format!("navigator.clipboard.writeText(\"{command}\")");

html! {
Expand Down

0 comments on commit 5d252d3

Please sign in to comment.