Skip to content

Commit

Permalink
fix: properly encoded interpolated dest urls
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Jan 14, 2022
1 parent adf8967 commit bf86ce6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/tribble-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ futures = "0.3"
perseus-size-opt = "0.1"
schemars = { version = "0.8", optional = true }
pulldown-cmark = "0.8"
urlencoding = "2"

[features]
schema = [ "schemars" ]
Expand Down
2 changes: 1 addition & 1 deletion packages/tribble-app/src/templates/workflow/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ fn render_report_endpoint(
)
);
// Interpolate that into the destination URL if needed
let dest_url = dest_url.replace("%s", &report_text);
let dest_url = dest_url.replace("%s", &urlencoding::encode(&report_text));

let copy_handler = cloned!(report_text => move |_| {
wasm_bindgen_futures::spawn_local(cloned!(report_text => async move {
Expand Down

0 comments on commit bf86ce6

Please sign in to comment.