normalize comment text and author names
This commit is contained in:
parent
d031504128
commit
c35f6ffa5b
@ -493,6 +493,8 @@ namespace RMuseum.Services.Implementation
|
|||||||
|
|
||||||
foreach(GanjoorCommentSummaryViewModel comment in allComments)
|
foreach(GanjoorCommentSummaryViewModel comment in allComments)
|
||||||
{
|
{
|
||||||
|
comment.AuthorName = comment.AuthorName.ToPersianNumbers().ApplyCorrectYeKe();
|
||||||
|
comment.HtmlComment = comment.HtmlComment.ToPersianNumbers().ApplyCorrectYeKe();
|
||||||
comment.HtmlComment = _Linkify(comment.HtmlComment);
|
comment.HtmlComment = _Linkify(comment.HtmlComment);
|
||||||
comment.HtmlComment = $"<p>{comment.HtmlComment.Replace("\r\n", "\n").Replace("\n\n", "\n").Replace("\n", "<br />".Replace("ي", "ی"))}</p>";
|
comment.HtmlComment = $"<p>{comment.HtmlComment.Replace("\r\n", "\n").Replace("\n\n", "\n").Replace("\n", "<br />".Replace("ي", "ی"))}</p>";
|
||||||
}
|
}
|
||||||
@ -567,6 +569,8 @@ namespace RMuseum.Services.Implementation
|
|||||||
|
|
||||||
foreach (GanjoorCommentFullViewModel comment in paginatedResult.Items)
|
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 = _Linkify(comment.HtmlComment);
|
||||||
comment.HtmlComment = $"<p>{comment.HtmlComment.Replace("\r\n", "\n").Replace("\n\n", "\n").Replace("\n", "<br />".Replace("ي", "ی"))}</p>";
|
comment.HtmlComment = $"<p>{comment.HtmlComment.Replace("\r\n", "\n").Replace("\n\n", "\n").Replace("\n", "<br />".Replace("ي", "ی"))}</p>";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user