feat(admin): stabilize blog and admin patterns
TaxBaik CI/CD / build-and-deploy (push) Has been cancelled
TaxBaik CI/CD / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using TaxBaik.Application.Services;
|
||||
using TaxBaik.Domain.Entities;
|
||||
using Markdig;
|
||||
using System.Net;
|
||||
|
||||
namespace TaxBaik.Web.Pages.Blog;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class BlogPostModel : PageModel
|
||||
Post = await _blogService.GetBySlugAsync(slug);
|
||||
if (Post != null)
|
||||
{
|
||||
HtmlContent = Markdown.ToHtml(Post.Content ?? "");
|
||||
HtmlContent = WebUtility.HtmlEncode(Post.Content ?? "").Replace("\r\n", "<br />").Replace("\n", "<br />");
|
||||
_ = _blogService.IncrementViewCountAsync(Post.Id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user