Browse Source

fix #1272 Check the content of post.

pull/1296/head
maliming 7 years ago
parent
commit
9bc03b4b90
  1. 5
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs

5
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs

@ -70,6 +70,11 @@ namespace Volo.Blogging.Pages.Blog
public string RenderMarkdownToString(string content) public string RenderMarkdownToString(string content)
{ {
if (content.IsNullOrWhiteSpace())
{
return "";
}
byte[] bytes = Encoding.Default.GetBytes(content); byte[] bytes = Encoding.Default.GetBytes(content);
var utf8Content = Encoding.UTF8.GetString(bytes); var utf8Content = Encoding.UTF8.GetString(bytes);

Loading…
Cancel
Save