replace ZWNJ with space in search
This commit is contained in:
parent
de861ccd88
commit
2c900f711f
@ -111,6 +111,7 @@ namespace GanjooRazor.Pages
|
||||
LoggedIn = !string.IsNullOrEmpty(Request.Cookies["Token"]);
|
||||
|
||||
Query = Request.Query["s"].ApplyCorrectYeKe().Trim();
|
||||
Query = Query.Replace('', ' '); //replace zwnj with space
|
||||
PoetId = string.IsNullOrEmpty(Request.Query["author"]) ? 0 : int.Parse(Request.Query["author"]);
|
||||
CatId = string.IsNullOrEmpty(Request.Query["cat"]) ? 0 : int.Parse(Request.Query["cat"]);
|
||||
|
||||
|
||||
@ -1879,6 +1879,10 @@ namespace RMuseum.Services.Implementation
|
||||
{
|
||||
return new RServiceResult<(PaginationMetadata PagingMeta, GanjoorPoemCompleteViewModel[] Items)>((null, null), "خطای جستجوی عبارت خالی");
|
||||
}
|
||||
|
||||
term = term.Replace("", " ");//replace zwnj with space
|
||||
|
||||
|
||||
string searchConditions;
|
||||
if(term.IndexOf('"') == 0 && term.LastIndexOf('"') == (term.Length - 1))
|
||||
{
|
||||
@ -2060,7 +2064,7 @@ namespace RMuseum.Services.Implementation
|
||||
string plainText = "";
|
||||
foreach (GanjoorVerse verse in verses)
|
||||
{
|
||||
plainText += $"{verse.Text} ";
|
||||
plainText += $"{verse.Text.Replace("", " ")} ";//replace zwnj with space
|
||||
}
|
||||
|
||||
dbPoem.PlainText = plainText.Trim();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user