Skip to content

Commit

Permalink
Added string StringComparison to contains function and removed ToLower
Browse files Browse the repository at this point in the history
  • Loading branch information
ErvinsA committed Oct 6, 2023
1 parent 8751186 commit 41b5a07
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void Load()
private IEnumerable<Tag> FindTags()
{
var allTags = _tagRepository.GetAllTags().ToList();
return HasQuery ? allTags.Where(x => x.Name.ToLowerInvariant().Contains(Query.ToLowerInvariant())) : allTags;
return HasQuery ? allTags.Where(x => x.Name.Contains(Query, StringComparison.InvariantCultureIgnoreCase)) : allTags;
}

private void EditTagsInContentRepository(Tag tagFromTagRepository, TagEditModel tagFromUser)
Expand Down

0 comments on commit 41b5a07

Please sign in to comment.