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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
1 deletions
-
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) |
|
|
|
|