Browse Source

Merge pull request #1467 from lwqwag/fixBlogModuleBug

fix Blog Entity  content is empty or null will throw IndexOutOfRangeE…
pull/1472/head
maliming 7 years ago
committed by GitHub
parent
commit
293e840200
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs

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

@ -34,7 +34,10 @@ namespace Volo.Blogging.Pages.Blog
var closingTag = "</p>";
var html = RenderMarkdownToString(content);
if (string.IsNullOrWhiteSpace(html))
{
return "";
}
var splittedHtml = html.Split(closingTag);
if (splittedHtml.Length < 1)

Loading…
Cancel
Save