From c35f6ffa5bd2f7f33cc693d5a08217be210ac6ff Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Fri, 12 Feb 2021 09:16:19 +0330 Subject: [PATCH] normalize comment text and author names --- RMuseum/Services/Implementation/GanjoorService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index 89d88022..38b6632b 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -493,6 +493,8 @@ namespace RMuseum.Services.Implementation foreach(GanjoorCommentSummaryViewModel comment in allComments) { + comment.AuthorName = comment.AuthorName.ToPersianNumbers().ApplyCorrectYeKe(); + comment.HtmlComment = comment.HtmlComment.ToPersianNumbers().ApplyCorrectYeKe(); comment.HtmlComment = _Linkify(comment.HtmlComment); comment.HtmlComment = $"

{comment.HtmlComment.Replace("\r\n", "\n").Replace("\n\n", "\n").Replace("\n", "
".Replace("ي", "ی"))}

"; } @@ -567,6 +569,8 @@ namespace RMuseum.Services.Implementation foreach (GanjoorCommentFullViewModel comment in paginatedResult.Items) { + comment.AuthorName = comment.AuthorName.ToPersianNumbers().ApplyCorrectYeKe(); + comment.HtmlComment = comment.HtmlComment.ToPersianNumbers().ApplyCorrectYeKe(); comment.HtmlComment = _Linkify(comment.HtmlComment); comment.HtmlComment = $"

{comment.HtmlComment.Replace("\r\n", "\n").Replace("\n\n", "\n").Replace("\n", "
".Replace("ي", "ی"))}

"; }