From 3732ad63062933f23569d3e335911c7fc21f6c00 Mon Sep 17 00:00:00 2001 From: Harry Dalton Date: Mon, 11 Nov 2024 22:16:15 +0000 Subject: [PATCH] Fix repro command JavaScript quoting, after addition of bash quoting We must use double-quotes for the outer quoting, to avoid collisions with the single-quotes used for the inner quoting. See b3faa37e41e3b6d63f61e2ea7d5c7b8dbacf2638 --- fontc_crater/src/ci/html.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fontc_crater/src/ci/html.rs b/fontc_crater/src/ci/html.rs index 9694389e..6d60b2fb 100644 --- a/fontc_crater/src/ci/html.rs +++ b/fontc_crater/src/ci/html.rs @@ -362,7 +362,7 @@ fn make_diff_report( let repo_url = get_repo_url(target); let ttx_command = target.repro_command(repo_url); - let onclick = format!("event.preventDefault(); copyText('{ttx_command}');",); + let onclick = format!("event.preventDefault(); copyText(\"{ttx_command}\");",); let decoration = make_delta_decoration(*ratio, prev_ratio, More::IsBetter); let changed_tag_list = list_different_tables(diff_details).unwrap_or_default(); let diff_table = format_diff_report_detail_table(diff_details, prev_details); @@ -683,7 +683,7 @@ fn make_error_report_group_items<'a>( let make_repro_command = |target: &Target| { let url = get_repo_url(target); let ttx_command = target.repro_command(url); - format!("event.preventDefault(); copyText('{ttx_command}');",) + format!("event.preventDefault(); copyText(\"{ttx_command}\");",) }; html! { @for (path, is_new) in paths_and_if_is_new_error {