From eb594413d9c1ddb79f3eef498d13bb372213f0bc Mon Sep 17 00:00:00 2001 From: p11 Date: Mon, 7 Apr 2025 00:25:15 +0200 Subject: [PATCH] Use maud to write comment html --- src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 7309df9..04814c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -700,7 +700,13 @@ fn handle_relative_connection( let _ = stream.write_all(html.into_string().as_bytes()); for Comment { name, text } in &info.comments { - let _ = writeln!(stream, "
{name}{text}
"); + let html = html! { + fieldset { + legend { (name) } + (maud::PreEscaped(text)) + } + }; + let _ = stream.write_all(html.into_string().as_bytes()); } section(&mut stream);