about summary refs log tree commit diff
path: root/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.rs')
-rw-r--r--src/render.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render.rs b/src/render.rs
index 537cab59daef..3254d480b5d2 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -120,9 +120,10 @@ fn md5_hex(input: &[u8]) -> String {
 
 fn prepare_thread(comrak: &ComrakOptions, page: ThreadPage) -> RenderableThreadPage {
     let posts = page.posts.into_iter().map(|post| {
+        let escaped_body = escape_html(&post.body);
         RenderablePost {
             id: post.id,
-            body: markdown_to_html(&post.body, comrak),
+            body: markdown_to_html(&escaped_body, comrak),
             posted: post.posted.into(),
             author_name: post.author_name,
             author_gravatar: md5_hex(post.author_email.as_bytes()),