From 4ed101b0dce0f25c30566f0cc85f6e117cf884b3 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 10 Jul 2020 08:25:11 +0200 Subject: [PATCH] Fix bad check --- src/controllers/comments_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/comments_controller.rs b/src/controllers/comments_controller.rs index c49a89b..814177b 100644 --- a/src/controllers/comments_controller.rs +++ b/src/controllers/comments_controller.rs @@ -22,7 +22,7 @@ pub fn create(r: &mut HttpRequestHandler) -> RequestResult { let (content, image) = if r.has_file("image") { ( - remove_html_nodes(&r.post_string("content")?), + remove_html_nodes(&r.post_string_opt("content", 0, false)?), Some(r.save_post_image("image", PATH_COMMENTS_IMAGES, 700, 700)?) ) } else {