Use maud to write comment html

This commit is contained in:
p11 2025-04-07 00:25:15 +02:00
parent efdc800550
commit eb594413d9

View File

@ -700,7 +700,13 @@ fn handle_relative_connection(
let _ = stream.write_all(html.into_string().as_bytes()); let _ = stream.write_all(html.into_string().as_bytes());
for Comment { name, text } in &info.comments { for Comment { name, text } in &info.comments {
let _ = writeln!(stream, "<fieldset><legend>{name}</legend>{text}</fieldset>"); let html = html! {
fieldset {
legend { (name) }
(maud::PreEscaped(text))
}
};
let _ = stream.write_all(html.into_string().as_bytes());
} }
section(&mut stream); section(&mut stream);