From e0d15c1a094f193a85cd9304bf86edabbf46a902 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Mon, 2 Oct 2023 18:02:49 -0400 Subject: [PATCH] fix: correctly quote spread attributes in `{..attrs}` syntax (closes #1826) (#1831) --- leptos_macro/src/view/server_template.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leptos_macro/src/view/server_template.rs b/leptos_macro/src/view/server_template.rs index a761e4cd30..8ada4e8179 100644 --- a/leptos_macro/src/view/server_template.rs +++ b/leptos_macro/src/view/server_template.rs @@ -284,7 +284,7 @@ fn element_to_tokens_ssr( template.push_str(" {}"); holes.push(quote! { {#end}.into_iter().filter_map(|(name, attr)| { - Some(format!("{}={}", name, ::leptos::leptos_dom::ssr::escape_attr(&attr.as_nameless_value_string()?))) + Some(format!("{}=\"{}\"", name, ::leptos::leptos_dom::ssr::escape_attr(&attr.as_nameless_value_string()?))) }).collect::>().join(" ") }); };