From 4dfe7dd5ef889a200ab9620e2f93610ec4fb1f70 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 27 May 2020 10:23:06 +0300 Subject: [PATCH] Fix: blogging moduule comment and login redirect problems resolves https://github.com/abpframework/abp/issues/4063 --- .../Volo/Blogging/Comments/CommentAppService.cs | 2 ++ .../src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml | 4 ++-- .../blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.js | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Comments/CommentAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Comments/CommentAppService.cs index cf34edb434..8ceb20427e 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Comments/CommentAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Comments/CommentAppService.cs @@ -86,6 +86,8 @@ namespace Volo.Blogging.Comments comment = await _commentRepository.InsertAsync(comment); + await CurrentUnitOfWork.SaveChangesAsync(); + return ObjectMapper.Map(comment); } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml index 2efd9b1d22..bf8c121688 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml @@ -151,7 +151,7 @@ } else { - @L["LeaveComment"] + @L["LeaveComment"] } @@ -342,7 +342,7 @@ } else { - @L["LeaveComment"] + @L["LeaveComment"] } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.js index 3edacd49b5..f5686e64e6 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.js +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.js @@ -118,6 +118,9 @@ $titleLengthWarning.hide(); } + title = title.replace(' &', ' '); + title = title.replace('& ', ' '); + title = title.replace('&', ''); title = title.replace(' ', '-'); title = title.replace(new RegExp(' ', 'g'), '-'); reflectedChange = true;