fix: correctly quote spread attributes in {..attrs} syntax (closes #1826) (#1831)

This commit is contained in:
Greg Johnston 2023-10-02 18:02:49 -04:00 committed by GitHub
parent 6f9c40b0a8
commit e0d15c1a09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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::<Vec<_>>().join(" ")
});
};