From 9bc03b4b90c65cc2685273e535c820b714101f4b Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 17 Jun 2019 12:54:57 +0800 Subject: [PATCH] fix #1272 Check the content of post. --- .../src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs index 88133e0e84..1c954bd58d 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs @@ -70,6 +70,11 @@ namespace Volo.Blogging.Pages.Blog public string RenderMarkdownToString(string content) { + if (content.IsNullOrWhiteSpace()) + { + return ""; + } + byte[] bytes = Encoding.Default.GetBytes(content); var utf8Content = Encoding.UTF8.GetString(bytes);